Question:
Hi guys,
i got the following coding, append_bdc fills the bdcdata-structure:
REFRESH BDCDATA.
PERFORM APPEND_BDC USING 'SAPMP56T' '0002' 'X' ' ' ' '.
PERFORM APPEND_BDC USING ' ' ' ' ' ' 'BDC_OKCODE' '=PERNRWE'.
PERFORM APPEND_BDC USING 'SAPMP56T' '0001' 'X' ' ' ' '.
PERFORM APPEND_BDC USING ' ' ' ' ' ' 'BDC_CURSOR' 'PTP40-PERNR'.
PERFORM APPEND_BDC USING ' ' ' ' ' ' 'BDC_OKCODE' '=ENTER'.
PERFORM APPEND_BDC USING ' ' ' ' ' ' 'PTP40-PERNR' '00811111'.
PERFORM APPEND_BDC USING 'SAPMP56T' '0002' 'X' ' ' ' '.
PERFORM APPEND_BDC USING ' ' ' ' ' ' 'BDC_OKCODE' '=BACK'.
CALL TRANSACTION 'TRIP' USING BDCDATA MODE 'E' UPDATE 'S'.
it works fine, but the problem is that the user has to click on the buttons for every step...
is it somehow possible to do these steps automatically in background and show the user only the last screen/dynpro?
thx in advance...
Answer:
Hi,
It seems to me that using Mode = ‘E’ as you describe should mean that the user sees only any error screens:
Mode = ‘E’ – show error screens only
Mode = ‘A’ – run in background
Mode = ‘N’ – run in foreground
So using ‘A’ should achieve what you want. You might want to add
MESSAGES INTO messtab
after the CALL though, then decode the relevant messages returned in the messtab structure to give back to the user proof of each update (or detect errors if SUBRC from CALL <> 0)
Lots more on BDC on R’s Knowledge Corner Item 0018:
/forums/viewtopic.php?t=110206
Answer:
thx,
but i already tried the different modes and even with "A" i have to confirm every step with a "=" (=pernrwe, etc) - how to get it done automatically in background AND only see the last step/dynpro?