Application Development 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: 

Call Transaction n skip TWO/THREE screens..is'it possible???

former_member196593
Participant
0 Kudos

Call Transaction n skip TWO/THREE screens..is'it possible???

hi friends
I have a requirement to invoke tcode 'VA02' from a report output.

When the user clicks on the PUSH BUTTON from my  report it  will calling the  BDC recording and user can able to change the  price  skipping the [b]first 2screens.[/b]
I tried call transaction and skip first screen but it stops at the select View POP-UP( basically only skips first screen).

Also tried to create a BDCDATA table with data for first two screens and then invoke call tcode VA02  mode E. But it simply doesnt show any screen ofVA02 ( guess it proceeses it in background as no error).
Mode A takes me through all the screens.

So is there a way out directly to jump at the pricing  screen  thus skipping the first two screens .

see my beelow code :

"BDC PART WHEN THE USE  CLICK ON PRICEORDER BUTTON THE IT  WILL GO TO VA02 TCODE  AND USER CAN ABLE TO MAKE CHANGES IN PRICE  FIELD.

DATA: BDCITAB LIKE BDCDATA    OCCURS 0 WITH HEADER LINE,

       BDCERRR LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.

DATA:  

          CTUMODE LIKE CTU_PARAMS-NOBINPT value 'E' ,

         CUPDATE LIKE CTU_PARAMS-UPDMODE.

DATA: IT_BDCDATA TYPE TABLE OF BDCDATA.

DATA  : WA_BDCDATA TYPE BDCDATA.

FORM CHANG_PRICE .

   PERFORM BDC_DYNPRO      USING 'SAPMV45A' '0102'.

   PERFORM BDC_FIELD       USING 'BDC_CURSOR'

                                 'VBAK-VBELN'.

   PERFORM BDC_FIELD       USING 'BDC_OKCODE'

                                 '/00'.

   PERFORM BDC_FIELD       USING 'VBAK-VBELN'

                                 GS_MANIFEST-VBELN.

   PERFORM BDC_DYNPRO      USING 'SAPMV45A' '4001'.

   PERFORM BDC_FIELD       USING 'BDC_OKCODE'

                                 '=PKO1'.

   PERFORM BDC_FIELD       USING 'KUAGV-KUNNR'

                                 '1001'.

   PERFORM BDC_FIELD       USING 'KUWEV-KUNNR'

                                 '1001'.

   PERFORM BDC_FIELD       USING 'RV45A-KETDAT'

                                 '06/21/2012'.

   PERFORM BDC_FIELD       USING 'RV45A-KPRGBZ'

                                 'D'.

   PERFORM BDC_FIELD       USING 'VBKD-PRSDT'

                                 '06/12/2012'.

   PERFORM BDC_FIELD       USING 'VBKD-ZTERM'

                                 'ZB01'.

   PERFORM BDC_FIELD       USING 'VBKD-INCO1'

                                 'CIP'.

   PERFORM BDC_FIELD       USING 'VBKD-INCO2'

                                 'Frankfurt'.

   PERFORM BDC_FIELD       USING 'BDC_CURSOR'

                                 'VBAP-POSNR(01)'.

   PERFORM BDC_FIELD       USING 'RV45A-VBAP_SELKZ(01)'

                                 'X'.

   PERFORM BDC_DYNPRO      USING 'SAPMV45A' '5003'.

   PERFORM BDC_FIELD       USING 'BDC_OKCODE'

                                 '=SICH'.

   PERFORM BDC_FIELD       USING 'BDC_CURSOR'

                                 'KOMV-KBETR(01)'.

   PERFORM BDC_FIELD       USING 'KOMV-KBETR(01)'

                                 '         388.40'.

   PERFORM BDC_DYNPRO      USING 'SAPLSPO2' '0101'.

   PERFORM BDC_FIELD       USING 'BDC_OKCODE'

                                 '=OPT1'.

   PERFORM BDC_TRANSACTION USING 'VA02'.

    COMMIT WORK.

   REFRESH : IT_BDCDATA.

   ENDFORM.

FORM BDC_DYNPRO  USING PROGRAM DYNPRO.

   CLEAR WA_BDCDATA.

   WA_BDCDATA-PROGRAM  = PROGRAM.

   WA_BDCDATA-DYNPRO   = DYNPRO.

   WA_BDCDATA-DYNBEGIN = 'X'.

   APPEND  WA_BDCDATA TO IT_BDCDATA .

ENDFORM.                    " BDC_DYNPRO

*&---------------------------------------------------------------------*

*&

*&

FORM BDC_FIELD  USING FNAM FVAL.

   CLEAR WA_BDCDATA.

   WA_BDCDATA-FNAM = FNAM. "Field name

   WA_BDCDATA-FVAL = FVAL. "bdc value.

   APPEND  WA_BDCDATA TO IT_BDCDATA .

ENDFORM.                    " BDC_FIELD

FORM BDC_TRANSACTION USING TCODE.

   CALL TRANSACTION TCODE   USING IT_BDCDATA

                      MODE   CTUMODE

                      UPDATE CUPDATE

                      MESSAGES INTO BDCERRR.

  .

ENDFORM.

Appreciate ur comments :)


1 ACCEPTED SOLUTION

former_member196593
Participant
0 Kudos

  thanks for  replying  guys..

finaly i found my self...

USER WHANT TO SEE  3RD  SCREEN DIRECTLY  SO FIRST WE NEED TO FIND THE OK CODE FOR THAT SCREEN(PRICING SCREEN )AND COMENT THE OK CODE AND  CHANGE MY MODE TYPE' 'E'.

SO WHN THE  USER CLICK CALL THE BDC IT  WILL  STOP THE  3RD SCREEN ITSELF(because we using MODE 'E' when  error  is  come  it will stop at the  screen )                                                    

here my coresponding ok code is

PERFORM BDC_FIELD       USING 'BDC_OKCODE'

                                 '=SICH'.

so i comment this one and  change the mode  type ''E' i was  working fine

6 REPLIES 6

former_member213851
Active Contributor
0 Kudos

Hi Srithar,

You need to create a  BDC for that.

Use SHDB to record the transaction. Leave it when it reaches your desired screen.

Now, in your program Call this BDC in  "N" (Background) mode .

Eg:

CALL TRANSACTION ' VA02 ' USING lt_bdcdata

                            MODE p_mode

                            MESSAGES INTO lt_messtab

lt_bdcdata of row type BDCDATA from the ABAP Dictionary

0 Kudos

thanks for ur quick reply dude  but my recurmnt is  when i call the bdc  user can able  to change  the price..(this  thing in 3rd  screen) i need  to  skip  first  two screen .... i have  tried  with   MODE 'E' also

but it simply dosnt show any screen also.

0 Kudos

Hi Srithar,

try to use options from opt as follows:

        DATA: bdcdata_wa  TYPE bdcdata,

        bdcdata_tab TYPE TABLE OF bdcdata.


        DATA opt TYPE ctu_params.



        opt-RACOMMIT = 'X'.

        opt-NOBINPT = 'X'.

        opt-NOBIEND = 'X'.

        opt-dismode = 'E'.

        CLEAR bdcdata_wa.

        bdcdata_wa-program  = 'SAPMZXXXX'.

        bdcdata_wa-dynpro   = '9000'.

        bdcdata_wa-dynbegin = 'X'.

        APPEND bdcdata_wa TO bdcdata_tab.

and so on.

then call transaction with:

        CALL TRANSACTION 'XXXX' USING BDCDATA_TAB options from opt.

Hope its helpfull

KR

Alfons

former_member196593
Participant
0 Kudos

  thanks for  replying  guys..

finaly i found my self...

USER WHANT TO SEE  3RD  SCREEN DIRECTLY  SO FIRST WE NEED TO FIND THE OK CODE FOR THAT SCREEN(PRICING SCREEN )AND COMENT THE OK CODE AND  CHANGE MY MODE TYPE' 'E'.

SO WHN THE  USER CLICK CALL THE BDC IT  WILL  STOP THE  3RD SCREEN ITSELF(because we using MODE 'E' when  error  is  come  it will stop at the  screen )                                                    

here my coresponding ok code is

PERFORM BDC_FIELD       USING 'BDC_OKCODE'

                                 '=SICH'.

so i comment this one and  change the mode  type ''E' i was  working fine

0 Kudos

hi shrithar,

m doing BDC for mb1a so i want to skip one screen its come after we fill materil charg  quantity .

its that possible.

basically i want to skip reason of movement which is cm in screen '410'

so it that possible

0 Kudos

if USER WHANT TO SEE  2nd SCREEN DIRECTLY  SO FIRST WE NEED TO FIND THE OK CODE FOR THAT SCREEN(l materil charg  quantity )AND JUST COMENT THE OK CODE
AND  CHANGE YOUR MODE TYPE' 'E'.

SO WHN THE  USER CLICK CALL THE BDC IT  WILL  STOP THE  3RD SCREEN ITSELF(because we using MODE 'E' when  error  is  come  it will stop at the  screen )                                                   

here my coresponding ok code is