‎2016 May 12 8:08 AM
I have an urgent requirement to programatically add few buttons in the existing application toolbar for a PF-Status of a program. I couldn't find any standard FM or programs to achieve this.
So, I created a BDC recording in SHDB using tcode 'SE41' and implemented a BDC call transaction for this. But, when I run in it, it's unable to auto populate function codes and therefore the BDC fails. When it is run in foreground mode ('A'), and when the fcodes are given manually, everything works fine. Could anyone please suggest me how can I achieve this either through BDC or any other method.
Program name - 'ZRS_RND',
PF-Status - 'ZSTATUS'
Function code to be added: 'CREA'
See below the SHDB recording for the same and no where it captured the Function Code(CREA) although it captured the 'Info Text' and 'Icon Text' etc., I tried to replace RSMPE-FUNC with Function Code i.e., 'CREA' but it doesn't work.
| SAPMSMPE | 0100 | X | ||
| BDC_CURSOR | RSMPE-PROGRAM | |||
| BDC_OKCODE | =CHNG | |||
| RSMPE-PROGRAM | ZRS_RND | |||
| RSMPE-B_STATUS | X | |||
| RSMPE-STATUS | ZSTATUS | |||
| SAPMSSY0 | 0120 | X | ||
| BDC_CURSOR | 05/23 | |||
| BDC_OKCODE | =PICK | |||
| SAPMSSY0 | 0120 | X | ||
| BDC_CURSOR | 20/43 | |||
| BDC_OKCODE | =RSCR | |||
| SAPLSMPE | 0113 | X | ||
| BDC_CURSOR | RSMPE-FUNC | |||
| BDC_OKCODE | =ENTR | |||
| RSMPE-B_TXT_STAT | X | |||
| SAPLSMPE | 0133 | X | ||
| BDC_CURSOR | RSMPE-INFO_TEXT | |||
| BDC_OKCODE | =ENTR | |||
| RSMPE-MENU | Create new records | |||
| RSMPE-ICON_NAME | ICON_CREATE | |||
| RSMPE-INFO_TEXT | Creates new records |
‎2016 May 23 1:49 PM
I solved it. The problem is that, BDC needs 2 lines for every step, one for the definition of the field and the other for populating the value for that field, but the BDC recording SHDB didn't(wouldn't) capture the Function code values for SE41. So, I modified the BDC code. All I did is that, I just added a line to populate function code. Note the line highlighted in red below.
| SAPMSMPE | 0100 | X | ||
| BDC_CURSOR | RSMPE-PROGRAM | |||
| BDC_OKCODE | =CHNG | |||
| RSMPE-PROGRAM | ZRS_RND | |||
| RSMPE-B_STATUS | X | |||
| RSMPE-STATUS | ZSTATUS | |||
| SAPMSSY0 | 0120 | X | ||
| BDC_CURSOR | 05/23 | |||
| BDC_OKCODE | =PICK | |||
| SAPMSSY0 | 0120 | X | ||
BDC_CURSOR 20/43 | 20/43 CREA | |||
| BDC_OKCODE | =RSCR | |||
| SAPLSMPE | 0113 | X | ||
| BDC_CURSOR | RSMPE-FUNC | |||
| BDC_OKCODE | =ENTR | |||
| RSMPE-B_TXT_STAT | X | |||
| SAPLSMPE | 0133 | X | ||
| BDC_CURSOR | RSMPE-INFO_TEXT | |||
| BDC_OKCODE | =ENTR | |||
| RSMPE-MENU | Create new records | |||
| RSMPE-ICON_NAME | ICON_CREATE | |||
| RSMPE-INFO_TEXT | Creates new records |
‎2016 May 12 8:17 AM
Try BDC recording for transaction SE90 -->Program Library-> Programming SubObjects--> Gui Status-->Enter program name, Gui status and execute, then select status checkbox and edit icon->add function key.
‎2016 May 12 8:31 AM
‎2016 May 23 1:49 PM
I solved it. The problem is that, BDC needs 2 lines for every step, one for the definition of the field and the other for populating the value for that field, but the BDC recording SHDB didn't(wouldn't) capture the Function code values for SE41. So, I modified the BDC code. All I did is that, I just added a line to populate function code. Note the line highlighted in red below.
| SAPMSMPE | 0100 | X | ||
| BDC_CURSOR | RSMPE-PROGRAM | |||
| BDC_OKCODE | =CHNG | |||
| RSMPE-PROGRAM | ZRS_RND | |||
| RSMPE-B_STATUS | X | |||
| RSMPE-STATUS | ZSTATUS | |||
| SAPMSSY0 | 0120 | X | ||
| BDC_CURSOR | 05/23 | |||
| BDC_OKCODE | =PICK | |||
| SAPMSSY0 | 0120 | X | ||
BDC_CURSOR 20/43 | 20/43 CREA | |||
| BDC_OKCODE | =RSCR | |||
| SAPLSMPE | 0113 | X | ||
| BDC_CURSOR | RSMPE-FUNC | |||
| BDC_OKCODE | =ENTR | |||
| RSMPE-B_TXT_STAT | X | |||
| SAPLSMPE | 0133 | X | ||
| BDC_CURSOR | RSMPE-INFO_TEXT | |||
| BDC_OKCODE | =ENTR | |||
| RSMPE-MENU | Create new records | |||
| RSMPE-ICON_NAME | ICON_CREATE | |||
| RSMPE-INFO_TEXT | Creates new records |