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: 

Withholding tax details screen

Former Member
0 Kudos

Hi ! I've created a report to display vendor withholding tax details. Now, i want to open the Withholding Tax details screen as soon as the user clicks on the vendor code in the report.

Following code used to call the XK02 screen:-

FORM USER_COMMAND USING LV_UCOMM LIKE SY-UCOMM SELFIELD TYPE SLIS_SELFIELD.

CASE LV_UCOMM.

WHEN '&IC1'.

READ TABLE IT_VENDOR INDEX SELFIELD-TABINDEX.

CASE SELFIELD-FIELDNAME.

WHEN 'LIFNR'.

SET PARAMETER ID 'LIF' FIELD IT_VENDOR-LIFNR.

SET PARAMETER ID 'BUK' FIELD IT_VENDOR-BUKRS.

CALL TRANSACTION 'XK02' AND SKIP FIRST SCREEN.

ENDCASE.

ENDCASE.

ENDFORM. "USER_COMMAND

Please help.

1 ACCEPTED SOLUTION

umashankar_sahu
Active Participant
0 Kudos

Hi Dear ;

If your report output is in the ALV format then just take care of few points.

1. in your ALV one of the parameter known as

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

should pass.

if it is not alv and normal list then you have to write a command at line selection .

6 REPLIES 6

umashankar_sahu
Active Participant
0 Kudos

Hi Dear ;

If your report output is in the ALV format then just take care of few points.

1. in your ALV one of the parameter known as

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

should pass.

if it is not alv and normal list then you have to write a command at line selection .

0 Kudos

Thanks for replying. I'm passing user_command to the ALV function. But this is not the issue.

I want to get the Withholding Tax Details screen as soon as the user clicks on the Vendor code. And now i'm just able to call the Transaction - XK02 with vendor code and p.org.

0 Kudos

Hi Dear

Check similar kind of reuirement i have done for FD33

CASE P_COMM.

  • Double Click Event

WHEN '&IC1'.

IF LS_SELFIELD-TABINDEX > 0 AND LS_SELFIELD-SUMINDEX LE 0.

READ TABLE PAYER_KNKK_1 INTO LS_PAYER INDEX LS_SELFIELD-TABINDEX.

********

PERFORM BDC_DYNPRO USING 'SAPMF02C' '0100'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'RF02L-D0210'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_FIELD USING 'RF02L-KUNNR'

LS_PAYER-KUNNR.

PERFORM BDC_FIELD USING 'RF02L-KKBER'

LS_PAYER-KKBER.

PERFORM BDC_FIELD USING 'RF02L-D0210'

'X'.

PERFORM BDC_DYNPRO USING 'SAPMF02C' '0210'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=UPDA'.

opt-dismode = 'E'.

opt-defsize = 'X'.

CALL TRANSACTION 'FD33' USING I_BDCTAB OPTIONS FROM opt.

ENDIF.

ENDCASE.

FORM BDC_DYNPRO USING PROGRAM DYNPRO.

I_BDCTAB-PROGRAM = PROGRAM.

I_BDCTAB-DYNPRO = DYNPRO.

I_BDCTAB-DYNBEGIN = 'X'.

APPEND I_BDCTAB.

CLEAR I_BDCTAB.

endform.

FORM BDC_FIELD USING FNAM FVAL.

I_BDCTAB-FNAM = FNAM.

I_BDCTAB-FVAL = FVAL.

APPEND I_BDCTAB.

CLEAR I_BDCTAB.

ENDFORM. "bdc_field

May be helpful.

0 Kudos

Thank you very much.

But could you please explain :-

opt-dismode = 'E'.

opt-defsize = 'X'.

FORM BDC_DYNPRO USING PROGRAM DYNPRO.

I_BDCTAB-PROGRAM = PROGRAM.

I_BDCTAB-DYNPRO = DYNPRO.

I_BDCTAB-DYNBEGIN = 'X'.

APPEND I_BDCTAB.

CLEAR I_BDCTAB.

endform.

FORM BDC_FIELD USING FNAM FVAL.

I_BDCTAB-FNAM = FNAM.

I_BDCTAB-FVAL = FVAL.

APPEND I_BDCTAB.

CLEAR I_BDCTAB.

ENDFORM. "bdc_field

These opt and bdcdata are giving error message.

Please help.

0 Kudos

Hello Dear,

if it is syntex error due to declartion then include below mentioned declaration.

DATA:BEGIN OF I_BDCTAB OCCURS 0.

INCLUDE STRUCTURE BDCDATA.

DATA:END OF I_BDCTAB.

DATA opt TYPE ctu_params.

0 Kudos

Thank you so very much. Your solution solved my problem very easily.