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: 

Unable to Pass Value through Parameter ID

prkash_s
Participant
0 Kudos
623

Hi ,

I Cant able  to Pass  value from my zreport to Tcode "co40 "  , Except "PLNUM FIELD"

  In co40 Tcode  its having 3 Parameters

This is the Code  that i had done to pass value from  my Zreport  to CO40  Unfortunately

Unable to Pass   parameter ID 'ANR '  (PLNUM)  

 

    SET PARAMETER ID :     'ANR' FIELD selfield-VALUE,

                            'PAF' FIELD ZAUFNR,

                           'AAF' FIELD 'PP02',

                           'TPA' FIELD 'X' .

Please  Help me To Sort out this Issue...... ASAP

  Thanks in  Advance .

Prakash .S

1 ACCEPTED SOLUTION

iftah_peretz
Active Contributor
0 Kudos
229

Hi Prkash,

I think that there is an issue here, in which they missed this field, nontheless,

here is a solution ready to cut and paste with the values you provided:

REPORT  zprg39.

DATA: BEGIN OF bdctab OCCURS 100.

        INCLUDE STRUCTURE bdcdata.

DATA: END OF bdctab.



    PERFORM bdc_screen USING 'SAPLCOKO1'  '0150'  'X'.

    PERFORM bdc_fill USING   'AFPOD-PLNUM'  'P140N'.

    PERFORM bdc_fill USING   'AFPOD-TPAUF'  'X'.

    PERFORM bdc_fill USING   'AUFPAR-PP_AUFART'  'PP02'.

    PERFORM bdc_fill USING   'CAUFVD-AUFNR'  '13'.







           call transaction 'CO40' USING BDCTAB.



*------------------------------------------------------------

* form Start new screen

*------------------------------------------------------------

FORM bdc_screen USING program dynpro dynbegin .

  CLEAR bdctab.

  bdctab-program = program.

  bdctab-dynpro = dynpro.

  bdctab-dynbegin = dynbegin .

  APPEND bdctab.

ENDFORM.                    "bdc_screen



*------------------------------------------------------------

* form Fill BDCTAB.

*------------------------------------------------------------

FORM bdc_fill USING fnam fval.

  CLEAR bdctab.

  bdctab-fnam = fnam.

  bdctab-fval = fval.

  APPEND bdctab.

ENDFORM.                    "bdc_fill

9 REPLIES 9

Former Member
0 Kudos
229

post ur entire code, i doubt that at the time of passing these fields may be empty.

0 Kudos
229

ZAUFNR = 'P0492m'.

SET PARAMETER ID :     'ANR' FIELD selfield-VALUE,

                            'PAF' FIELD ZAUFNR,

                           'AAF' FIELD 'PP02',

                           'TPA' FIELD 'X' .

This is the Value I Had Passed at Runtime  .

0 Kudos
229

check the values for the other fields also.

what are the statements just after passing values to parameter id.

and i have asked u to post ur entire code of the report.

0 Kudos
229

hi abishek,

Please find the Src ,

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

*& Report  ZPRG39                                                      *

*&                                                                     *

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

*&                                                                     *

*&                                                                     *

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

report  zprg39                                  .

       set parameter id :     'ANR' field  'PLNUM',

                              'PAF' field  'P140N' ,

                              'AAF' field 'PP02',

                              'TPA' field 'X' .

           call transaction 'CO40'." AND SKIP FIRST SCREEN.


iftah_peretz
Active Contributor
0 Kudos
230

Hi Prkash,

I think that there is an issue here, in which they missed this field, nontheless,

here is a solution ready to cut and paste with the values you provided:

REPORT  zprg39.

DATA: BEGIN OF bdctab OCCURS 100.

        INCLUDE STRUCTURE bdcdata.

DATA: END OF bdctab.



    PERFORM bdc_screen USING 'SAPLCOKO1'  '0150'  'X'.

    PERFORM bdc_fill USING   'AFPOD-PLNUM'  'P140N'.

    PERFORM bdc_fill USING   'AFPOD-TPAUF'  'X'.

    PERFORM bdc_fill USING   'AUFPAR-PP_AUFART'  'PP02'.

    PERFORM bdc_fill USING   'CAUFVD-AUFNR'  '13'.







           call transaction 'CO40' USING BDCTAB.



*------------------------------------------------------------

* form Start new screen

*------------------------------------------------------------

FORM bdc_screen USING program dynpro dynbegin .

  CLEAR bdctab.

  bdctab-program = program.

  bdctab-dynpro = dynpro.

  bdctab-dynbegin = dynbegin .

  APPEND bdctab.

ENDFORM.                    "bdc_screen



*------------------------------------------------------------

* form Fill BDCTAB.

*------------------------------------------------------------

FORM bdc_fill USING fnam fval.

  CLEAR bdctab.

  bdctab-fnam = fnam.

  bdctab-fval = fval.

  APPEND bdctab.

ENDFORM.                    "bdc_fill

0 Kudos
229

I m Not looking for bdc  , please Help me   to pass value Through Parameter ID ......

0 Kudos
229

I guess you have got the Parameter IDs jumbled.

Planned Order     : Field name = PLNUM , Parameter ID = PAF

Order type          :  Field name = AUFART , Parameter ID = AAF

Order Number : Field name = AUFNR , Parameter ID = ANR .

Partial Conv : Parameter ID = TPA

Sijin_Chandran
Active Contributor
0 Kudos
229

Hi Prkash ,

Check the Parameter id for each fields again.

iftah_peretz
Active Contributor
0 Kudos
229

Hi,

As I said before there is a sap issue there that requires a SAP note or maybe an OSS.

If you wanna manually fix this the place, in my mind, would be in include LCOKO1O1X

in MODULE DATA_SHOW OUTPUT, using some thing like:

IF SY-TCODE EQ 'CO40'.

  GET PARAMETER ID 'ANR' FIELD CAUFVD-AUFNR.

ENDIF.

Best,

Iftah