Skip to Content
0
Jan 15, 2009 at 07:41 AM

BDC problem with back button

318 Views

Hi all,

i have idoc number in alv output.when the user clicks on this ,it should take the control to BD87 transaction with idoc number getting transferred there .also BD87 screen has changed on select option where the default is sy-datum .i need to clear this along with transfer of idoc number.

i tried using submit statement,but its not working.

then i used call transaction in error mode to acheive this functionality and i was sucessful.

beloe is my code:

REFRESH bdcdata.

READ TABLE t_out INTO wa_out INDEX rs_selfield-tabindex.

DATA: lv_mode(1) TYPE c VALUE 'E'.

PERFORM bdc_dynpro USING 'RBDMON00' '1100'.

PERFORM bdc_field USING 'BDC_CURSOR'

'SX_UPDDA-HIGH'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=CRET'.

PERFORM bdc_field USING 'SX_DOCNU-LOW'

wa_out-docnum.

PERFORM bdc_field USING 'SX_CRETI-LOW'

'00:00:00'.

PERFORM bdc_field USING 'SX_CRETI-HIGH'

'00:00:00'.

PERFORM bdc_field USING 'SX_UPDDA-LOW'

''.

PERFORM bdc_field USING 'SX_UPDDA-HIGH'

''.

PERFORM bdc_field USING 'SX_UPDTI-LOW'

'00:00:00'.

PERFORM bdc_field USING 'SX_UPDTI-HIGH'

'00:00:00'.

PERFORM bdc_call_transaction USING 'BD87' lv_mode 'N'.

So,the control directly takes me inside the BD87 screen just after the screen which we get after execting the selection screen of bd87 with idoc details

the problem is whn i click on back button or F3,the control does not take me back to the ALV output screen rather it takes me to the selection screen of BD87.

So,any way out to solve the back button problem???

Thanks