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

call transaction

Former Member
0 Likes
654

Hi,

i have alv report which is showing LIFNR as one field.

now when user clicks LIFNR it should go to XK03.

but problem is that when i click in LIFNR it goes to XK03 but there is no selection field is 'X" on XK03 so it gives an error Please select atleast one option.

how can i select that field as 'X' through ALV.

Thanks

Hi,

i have alv report which is showing LIFNR as one field.

now when user clicks LIFNR it should go to XK03.

but problem is that when i click in LIFNR it goes to XK03 but there is no selection field is 'X" on XK03 so it gives an error Please select atleast one option.

how can i select that field as 'X' through ALV.

Thanks

4 REPLIES 4
Read only

Former Member
0 Likes
622

Hello,

Check this.


FORM CALL_MK03 USING    P_L_LIFN2 P_L_EKORG.

  PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0108'.
  PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                'RF02K-D0110'.
  PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                'USE_ZAV'.
  PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                '/00'.
  PERFORM BDC_FIELD       USING 'RF02K-LIFNR'
                                 P_L_LIFN2.
  PERFORM BDC_FIELD       USING 'RF02K-EKORG'
                                 P_L_EKORG.
  PERFORM BDC_FIELD       USING 'RF02K-D0110'
                                'X'.
  PERFORM BDC_FIELD       USING 'USE_ZAV'
                                'X'.
  PERFORM BDC_DYNPRO      USING 'SAPMF02K' '0111'.
  PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                'RF02K-LIFNR'.
  PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                '/00'.
  PERFORM BDC_DYNPRO      USING 'SAPLSPO1' '0100'.
  PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                '=NO'.

  CALL TRANSACTION 'MK03' USING G_T_BDC MODE 'E'.
  CLEAR G_T_BDC.
  REFRESH G_T_BDC.

ENDFORM.                                                    " call_mk03

Vasanth

Read only

Clemenss
Active Contributor
0 Likes
622

Hi Lalit,

as there is no memory ID for your X field, you have to CALL TRANSACTION USING ITAB and supply the bdc itab with the data.

Regards,

Clemens

Read only

Former Member
0 Likes
622

hi lalit,

i hope u r passing parameter id LIF for lifnr, BUK for company code and EKO for purchasing group.

you have select or tick any one from general data,company code data or purchasing data.

I think we cannot do that using call transcation, you have do it manually.

regards

prabhu

reward if it is helpful.

Read only

Former Member
0 Likes
622

Hi Lalit,

try this:

  • Definition der BDC-Tabelle

DATA: BEGIN OF BDCDATA OCCURS 500.

INCLUDE STRUCTURE BDCDATA.

DATA: END OF BDCDATA.

*

...

PERFORM XK03 USING WA_ITAB-LIFNR.

...

************************************************************************

FORM XK03 USING LIFNR.

*

REFRESH BDCDATA.

*

PERFORM BDC_DYNPRO USING 'SAPMF02K' '0101'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.

PERFORM BDC_FIELD USING 'RF02K-LIFNR' LIFNR.

  • Here you cat set to mark

PERFORM BDC_FIELD USING 'RF02K-D0110' 'X'.

*

*

CALL TRANSACTION 'XK03' USING BDCDATA MODE 'E'.

*

ENDFORM. "XK03

************************************************************************

FORM BDC_DYNPRO USING PROGRAM DYNPRO.

*

CLEAR BDCDATA.

BDCDATA-PROGRAM = PROGRAM.

BDCDATA-DYNPRO = DYNPRO.

BDCDATA-DYNBEGIN = 'X'.

APPEND BDCDATA.

*

ENDFORM. "BDC_DYNPRO

************************************************************************

FORM BDC_FIELD USING FNAM FVAL.

*

CLEAR BDCDATA.

BDCDATA-FNAM = FNAM.

BDCDATA-FVAL = FVAL.

APPEND BDCDATA.

*

ENDFORM. "BDC_FIELD

************************************************************************

Ragards, Dieter