Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC for SE41 doesn't populate the function code

Former Member
0 Kudos

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.

SAPMSMPE0100X
BDC_CURSORRSMPE-PROGRAM
BDC_OKCODE=CHNG
RSMPE-PROGRAMZRS_RND
RSMPE-B_STATUSX
RSMPE-STATUSZSTATUS
SAPMSSY00120X
BDC_CURSOR05/23
BDC_OKCODE=PICK
SAPMSSY00120X
BDC_CURSOR20/43
BDC_OKCODE=RSCR
SAPLSMPE0113X
BDC_CURSORRSMPE-FUNC
BDC_OKCODE=ENTR
RSMPE-B_TXT_STATX
SAPLSMPE0133X
BDC_CURSORRSMPE-INFO_TEXT
BDC_OKCODE=ENTR
RSMPE-MENU

Create new records

RSMPE-ICON_NAME

ICON_CREATE

RSMPE-INFO_TEXT

Creates new records

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.


SAPMSMPE0100X
BDC_CURSORRSMPE-PROGRAM
BDC_OKCODE=CHNG
RSMPE-PROGRAMZRS_RND
RSMPE-B_STATUSX
RSMPE-STATUSZSTATUS
SAPMSSY00120X
BDC_CURSOR05/23
BDC_OKCODE=PICK
SAPMSSY00120X

BDC_CURSOR

20/43

20/43

CREA

BDC_OKCODE=RSCR
SAPLSMPE0113X
BDC_CURSORRSMPE-FUNC
BDC_OKCODE=ENTR
RSMPE-B_TXT_STATX
SAPLSMPE0133X
BDC_CURSORRSMPE-INFO_TEXT
BDC_OKCODE=ENTR
RSMPE-MENU

Create new records

RSMPE-ICON_NAME

ICON_CREATE

RSMPE-INFO_TEXT

Creates new records

3 REPLIES 3

pranay570708
Active Contributor
0 Kudos

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.

0 Kudos

Thanks for your reply . But, the same problem again, It doesn't capture the function code.

Former Member
0 Kudos

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.


SAPMSMPE0100X
BDC_CURSORRSMPE-PROGRAM
BDC_OKCODE=CHNG
RSMPE-PROGRAMZRS_RND
RSMPE-B_STATUSX
RSMPE-STATUSZSTATUS
SAPMSSY00120X
BDC_CURSOR05/23
BDC_OKCODE=PICK
SAPMSSY00120X

BDC_CURSOR

20/43

20/43

CREA

BDC_OKCODE=RSCR
SAPLSMPE0113X
BDC_CURSORRSMPE-FUNC
BDC_OKCODE=ENTR
RSMPE-B_TXT_STATX
SAPLSMPE0133X
BDC_CURSORRSMPE-INFO_TEXT
BDC_OKCODE=ENTR
RSMPE-MENU

Create new records

RSMPE-ICON_NAME

ICON_CREATE

RSMPE-INFO_TEXT

Creates new records