Skip to Content
0
Former Member
Mar 10, 2008 at 03:06 PM

BDC Programming

51 Views

I need help setting up a BDC that works through multiple screens before executing.

I want a BDC that will:

1) Open ME38 using a given Scheduling Agreement.

2) Select the given line item and view the "delivery schedule".

3) Select the given line item and go to Item > Components > New BOM Explosion

4) Then back out to screen '1117' and save.

For some reason this is not working. Am I missing something to allow this to execute?

PERFORM open_group.

perform bdc_dynpro using 'SAPMM06E' '0205'.

perform bdc_field using 'BDC_CURSOR'

'RM06E-EVRTN'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RM06E-EVRTN'

wa_pkps-ebeln.

perform bdc_dynpro using 'SAPMM06E' '0222'.

perform bdc_field using 'BDC_CURSOR'

'RM06E-EVRTP(01)'.

perform bdc_field using 'BDC_OKCODE'

'=ET'.

perform bdc_field using 'RM06E-EBELP'

wa_pkps-ebelp.

perform bdc_field using 'RM06E-TCSELFLAG(01)'

'X'.

perform bdc_dynpro using 'SAPMM06E' '1117'.

perform bdc_field using 'BDC_CURSOR'

'RM06E-ETNR1'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RM06E-ETNR1'

' 1'.

perform bdc_dynpro using 'SAPMM06E' '1117'.

perform bdc_field using 'BDC_CURSOR'

'RM06E-EEIND(01)'.

perform bdc_field using 'BDC_OKCODE'

'=LBST'.

  • Get the newest entry number on the sched. agrmt

SELECT * from EKET into wa_eket where

ebeln = wa_pkps-ebeln and

ebelp = wa_pkps-ebelp.

append wa_eket to it_eket.

ENDSELECT.

Sort it_eket by etenr DESCENDING.

loop at it_eket INTO wa_eket.

perform bdc_field using 'RM06E-ETNR1'

wa_eket-etenr.

EXIT.

ENDLOOP.

perform bdc_dynpro using 'SAPLM61Q' '0115'.

perform bdc_field using 'BDC_OKCODE'

'=BACK'.

perform bdc_field using 'BDC_CURSOR'

'MDBA-MATNR'.

perform bdc_dynpro using 'SAPMM06E' '1117'.

perform bdc_field using 'BDC_CURSOR'

'RM06E-ETNR1'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

perform bdc_field using 'RM06E-ETNR1'

wa_eket-etenr.

perform bdc_dynpro using 'SAPLSLVC_FULLSCREEN' '0500'.

perform bdc_field using 'BDC_OKCODE'

'=&F03'.

perform bdc_transaction using 'ME38'.

Sincerely,

Matt