Application Development and Automation 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: 
Read only

Handle back button in standard tcode .

Former Member
0 Likes
1,400

I am doing a BDC on standard tcode MEMASSPO which displays the 3rd screen directly of the tcode.

Now problem is when I press the BACK button on this screen it takes me to the previous screen of the same tcode.

My requirement is that it should take me to SAP Menu when i click the BACK button.

I am pasting the BDC code below:

START-OF-SELECTION.

PERFORM bdc_dynpro USING 'SAPMMSDL' '0200'.

PERFORM bdc_field USING 'BDC_CURSOR'

'MASSSCREEN-VARNAME'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=TAB2'.

PERFORM bdc_dynpro USING 'SAPMMSDL' '0200'.

PERFORM bdc_field USING 'BDC_CURSOR'

'MASSSCREEN-VARNAME'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=FIND'.

PERFORM bdc_dynpro USING 'SAPLSPO4' '0300'.

PERFORM bdc_field USING 'BDC_CURSOR'

'SVALD-VALUE(01)'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=FURT'.

PERFORM bdc_field USING 'SVALD-VALUE(01)'

'ELIKZ'.

PERFORM bdc_dynpro USING 'SAPMMSDL' '0200'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=NEXT'.

PERFORM bdc_field USING 'BDC_CURSOR'

'MASSFVIEW-FIELDTEXT(02)'.

PERFORM bdc_field USING 'MASSFVIEW-CHECKBOX(01)'

'X'.

PERFORM bdc_field USING 'MASSFVIEW-CHECKBOX(02)'

'X'.

PERFORM bdc_dynpro USING 'SAPLMSMT' '0200'.

PERFORM bdc_field USING 'BDC_CURSOR'

'NONEXT'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=OK'.

PERFORM bdc_dynpro USING 'SAPLMASS_SEL_DIALOG' '0100'.

CALL TRANSACTION 'MEMASSPO' USING bdcdata MODE 'E'.

Please help me.......

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,060

Hi

I don't think you can do it, because what the button BACK has to do is in abap code of standard program (in your case MEMASSPO), so you should change it in order to do what you need

Max

6 REPLIES 6
Read only

Former Member
0 Likes
1,061

Hi

I don't think you can do it, because what the button BACK has to do is in abap code of standard program (in your case MEMASSPO), so you should change it in order to do what you need

Max

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,060

Hi,

You can do it by appending (at the end of the BDC data) the exit actions when the screen X (the one you get after the BACK button has been pressed) is reached.

As you run the BDC with mode 'E', it will stop the BDC data when SAP sees that screen X from the BDC data is not the screen currently displayed. Then, if the user displays later the screen X, SAP continues to execute the BDC data from screen X.

This topic is shortly described here: http://wiki.sdn.sap.com/wiki/display/ABAP/BatchInputFAQ#BatchInputFAQ-IsitpossibletosimulateANDSKIPFIRSTSCREENusingBDC%3F

Sandra

Read only

Former Member
0 Likes
1,060

BDC for MEMASSPO ...its strange.....why don't you use BDC for ME21 itself or LSMW...

regards

Prabhu

Read only

0 Likes
1,060

Hi Prabhu. we have the requirement for MEMASSPO as we want to restrict the user to viewing the complete PO.

Read only

0 Likes
1,060

The issue is solved we have used a BAPI for the requirement

Read only

Former Member
0 Likes
1,060

We have used a BAPI_PO_CHANGE FM for updating the PO