SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Modify Dynpro screen



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Dialog Programming
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Thu Oct 04, 2007 9:08 pm    Post subject: Modify Dynpro screen Reply with quote

Here is the workaround. The field _CB4 is a header in the table control
on screen 0300 of ZPMRMXX1. This peice of code needs to be executed
before the relevant screen is called. The first 2 functions is to read
and update the screen fields and the last one to generate the screen
before it is called.

Code:
DATA:
h_import LIKE d020s,
i_e_g LIKE d022s OCCURS 0 WITH HEADER LINE,
i_f_g LIKE d021s OCCURS 0 WITH HEADER LINE,
i_m_g LIKE d023s OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'RS_SCREEN_IMPORT'
     EXPORTING
          dynnr        = '0300'
          progname     = 'ZPMRMXX1'
          wanted_mode  = 'MODIFY'
     IMPORTING
          h_import     = h_import
     TABLES
          e_g          = i_e_g
          f_g          = i_f_g
          m_g          = i_m_g
     EXCEPTIONS
          not_executed = 1
          not_found    = 2
          OTHERS       = 3.

LOOP AT i_f_g.
  IF i_f_g-fnam = '_CB4'.
    i_f_g-stxt = 'ROB1'.
    MODIFY i_f_g.
  ENDIF.
ENDLOOP.

CALL FUNCTION 'RS_SCREEN_EXPORT'
     EXPORTING
          dynnr                 = '0300'
          h_export              = h_import
          progname              = 'ZPMRMXX1'
          dynpro_language       = sy-langu
          save_without_question = 'X'
          without_corr_insert   = 'X'
     TABLES
          e_g                   = i_e_g
          f_g                   = i_f_g
          m_g                   = i_m_g
     EXCEPTIONS
          canceled_by_user      = 1
          OTHERS                = 2.

CALL FUNCTION 'RS_SCRP_SERVICE'
     EXPORTING
          dynnr           = '0300'
          function        = 'GENER'
          progname        = 'ZPMRMXX1'
          suppress_checks = 'X'
     EXCEPTIONS
          illegal_value   = 1
          not_exists      = 2
          cancelled       = 3
          OTHERS          = 4.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Dialog Programming All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.