A Simple Case Requirement when you can handle 2 types of documents like Sales Document and Billing Document, then you want to change the label of the VBELN into sales/billing according the the selection of a radio button you have chosen. Well you can simply follow the following steps:
- Define Seltext table and workarea
DATA it_seltexts TYPE TABLE OF rsseltexts. DATA wa_seltexts TYPE rsseltexts.
- You can set a new selection text for several fields by inserting the record into it_seltexts table
wa_seltexts-kind = ' '. "Type of the field P/S (Parameters /Select Options) wa_seltexts-name = ' ' "Name of the field wa_seltexts-text = ' '. "Seletion text of the field INSERT wa_seltexts INTO TABLE it_seltexts.
- Finally, Call
modify function to execute the changes according the it_seltexts table
CALL FUNCTION 'SELECTION_TEXTS_MODIFY' EXPORTING program = sy-repid TABLES seltexts = it_seltexts * EXCEPTIONS * PROGRAM_NOT_FOUND = 1 * PROGRAM_CANNOT_BE_GENERATED = 2 * OTHERS = 3 . IF sy-subrc <> 0. ENDIF.
No comments:
Post a Comment