2008 Feb 13 5:02 PM
Hi, I'm using a module pool to create a dynpro as web interface. According to sy-tcode calling the dynpro I should be able to change the text of 3 pushbuttons. Is there a way to achieve that?
Alternatively, from screen painter I saw you can make an I/O field "sensible to double click", how is it possible to "catch" the click so that I can take an action as I'm doing with the pushbutton's function code?
2008 Feb 13 5:54 PM
Hi Carlos,
By Web interface do you mean you are creating a WebDynpro Component ?
However, if your query is related to a GUI transaction/module pool application then you can do the following:
Problem 1: Changing the texts on the pushbuttons
Well, say you have a button which shows "Display", "Create" and "Change" based on the Tcode you are accessing the transaction with. Then you create three buttons in your dialog screen. One with each text , however having the same OKCODE. Have separate modif IDs for them e.g. DIS, INS, CHG respectively and then based on sy-tcode you hide the not required buttons in PBO using LOOP AT SCREEN WHERE GROUP1 EQ ..... SCREEN-INVISIBLE = 1. SCREEN-ACTIVE = 0. MODIFY SCREEN. ENDLOOP.
In PAI, now you would get the same OKCODE for all the buttons, but you can further segragate by SY_TCODE as so
Case OKCODE.
WHEN 'BUTN'
CASE SY-TCODE.
WHEN '......
Problem 2: Double Click
When you set the flag for double click, you also need to assign an OKCODE viz. PICK to function key F2 in the PF status of the screen. Hence when the user double clicks on the I/O field, the function code PICK is auto triggered by SAP and can be captured in PAI module.
Now to know which field was double clicked on you can use GET CURSOR command to get the screen name of the field double clicked and subsequently the value.
Hope this information helps.
Cheers,
Aditya
Hi, I'm using a module pool to create a dynpro as web interface. According to sy-tcode calling the dynpro I should be able to change the text of 3 pushbuttons. Is there a way to achieve that?
Alternatively, from screen painter I saw you can make an I/O field "sensible to double click", how is it possible to "catch" the click so that I can take an action as I'm doing with the pushbutton's function code?
2008 Feb 13 5:54 PM
Hi Carlos,
By Web interface do you mean you are creating a WebDynpro Component ?
However, if your query is related to a GUI transaction/module pool application then you can do the following:
Problem 1: Changing the texts on the pushbuttons
Well, say you have a button which shows "Display", "Create" and "Change" based on the Tcode you are accessing the transaction with. Then you create three buttons in your dialog screen. One with each text , however having the same OKCODE. Have separate modif IDs for them e.g. DIS, INS, CHG respectively and then based on sy-tcode you hide the not required buttons in PBO using LOOP AT SCREEN WHERE GROUP1 EQ ..... SCREEN-INVISIBLE = 1. SCREEN-ACTIVE = 0. MODIFY SCREEN. ENDLOOP.
In PAI, now you would get the same OKCODE for all the buttons, but you can further segragate by SY_TCODE as so
Case OKCODE.
WHEN 'BUTN'
CASE SY-TCODE.
WHEN '......
Problem 2: Double Click
When you set the flag for double click, you also need to assign an OKCODE viz. PICK to function key F2 in the PF status of the screen. Hence when the user double clicks on the I/O field, the function code PICK is auto triggered by SAP and can be captured in PAI module.
Now to know which field was double clicked on you can use GET CURSOR command to get the screen name of the field double clicked and subsequently the value.
Hope this information helps.
Cheers,
Aditya
2008 Feb 14 8:42 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |