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: 

Newbie needs help with BDC CALL TRANSACTION to subscreens

former_member210148
Participant
0 Kudos

Good day, everyone.

I've done a basic CALL TRANSACTION before, but this is the first time I need to pass data to a transaction (FPO4) that has subscreens, or tabs, on its screen.

What is happening in my example code below is that the first field value (S_BUKRS-LOW) is getting populated with my value of 'PUR'. That's good. But there's an error message at the bottom of the screen that says "Field P_OBJ. does not exist in the screen RFKKOP04 1000." That field is on my 3rd tab; the second tab's field (P_NM_OPL) isn't getting populated, either.

I'm not sure what I'm doing wrong. I used SHDB to record going to the screen, putting in a value, clicking to a new tab, and putting in the new value. The code below is pretty much from the SHDB recording. I thought that the BDC_SUBSCR parameter changes to the new tab, but apparently that isn't the case.

Can anyone tell me what I'm doing wrong? As always, all helpful answers receive points. Thanks so much! Here's my code:

PERFORM bdc_dynpro USING 'RFKKOP04' '1000'.

  • Populate the "Selections" tab on the FPO4 Selection Screen.

PERFORM bdc_field USING 'BDC_OKCODE' '=TB12'.

PERFORM bdc_field USING 'BDC_SUBSCR' 'RFKKOP04 1001%_SUBSCREEN_TAB_B1'.

PERFORM bdc_field USING 'S_BUKRS-LOW' 'PUR'.

  • Populate the "Output Control" tab on the FPO4 Selection Screen.

PERFORM bdc_field USING 'BDC_OKCODE' '=TB13'.

PERFORM bdc_field USING 'BDC_SUBSCR' 'RFKKOP04 1002%_SUBSCREEN_TAB_B1'.

PERFORM bdc_field USING 'P_NM_OPL' 'PUR1'.

  • Populate the "Technical Settings" tab on the FPO4 Selection Screen.

PERFORM bdc_field USING 'BDC_OKCODE' '=ONLI'.

PERFORM bdc_field USING 'BDC_SUBSCR' 'RFKKOP04 1003%_SUBSCREEN_TAB_B1'.

PERFORM bdc_field USING 'P_OBJ' 'GPART'.

CALL TRANSACTION 'FPO4' USING bdcdata

MODE 'A'

UPDATE 'L'

MESSAGES INTO messtab.

FORM bdc_dynpro USING program dynpro.

CLEAR bdcdata.

bdcdata-program = program.

bdcdata-dynpro = dynpro.

bdcdata-dynbegin = 'X'.

APPEND bdcdata.

ENDFORM. " bdc_dynpro

FORM bdc_field USING fnam fval.

CLEAR bdcdata.

bdcdata-fnam = fnam.

bdcdata-fval = fval.

APPEND bdcdata.

ENDFORM. " bdc_field

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Dave,

I think there is something wrong in your recording. Can you please check it once.may be you need to remove PERFORM bdc_field USING 'BDC_SUBSCR' 'RFKKOP04 1001%_SUBSCREEN_TAB_B1'. and need to add PERFORM bdc_dynpro USING 'RFKKOP04' '1000'. for each tab.

Regards,

Atish

5 REPLIES 5

Former Member
0 Kudos

Hi Dave,

I think there is something wrong in your recording. Can you please check it once.may be you need to remove PERFORM bdc_field USING 'BDC_SUBSCR' 'RFKKOP04 1001%_SUBSCREEN_TAB_B1'. and need to add PERFORM bdc_dynpro USING 'RFKKOP04' '1000'. for each tab.

Regards,

Atish

0 Kudos

Atish,

I took out the "BDC_SUBSCR" statements (there's a BDC_DYNPRO statement already there for the screen you mention) but I got the exact same error.

I did notice something, though -- the 3 tabs are screen 1001, 1002, and 1003, respectively. Do I need to go to each of these screens individually? Why is it populating the field on the first tab, on screen 1001, when I have it start with 1000? And finally, are these not really "subscreens" at all?

0 Kudos

Atish, I put in the extra PERFORM bdc_dynpro statements like you said, but kept in the PERFORM bdc_field USING 'BDC_SUBSCR'... statements, and that seemed to do the trick.

For the life of me, though, I don't understand why I keep needing to specify the same screen repeatedly in that bdc_dynpro statement. If anyone knows why and wouldn't mind letting me know, I'd really appreciate it!

Thanks Atish! Points awarded to you.

0 Kudos

Hi Dave,

Each OK Code, is always combined with the screen. So you need to pass the screen name each time for that OK code.

Hope it is clear now.

Regards,

Atish

0 Kudos

Ah, okay -- that makes sense. And that's a great thing for me to learn.

Thank you so much for your help, Atish. This is another example of why I love these forums so much. Full 10 points awarded to you for your help!

Have a great day,

Dave