Skip to Content
0
Oct 25, 2007 at 05:05 PM

Newbie needs help with BDC CALL TRANSACTION to subscreens

975 Views

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