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

QC01_BATCH_VALUES_READ

kiran_k8
Active Contributor
0 Likes
1,804

Hi

Following code is giving an error,seems problem with passing the internal parameters,can anyone throw some light on where I am going wrong.




REPORT  ZSCRATCHPAD                             .
data: begin of valtab occurs 0.
       include structure api_vali.
 data: end of valtab.
 data: begin of chartab occurs 0.
       include structure api_char.
 data: end of chartab.
 data: begin of atttab occurs 0.
       include structure api_ch_att.
 data: end of atttab.

data: charg like vbdpl-charg value ' '.
CALL FUNCTION 'QC01_BATCH_VALUES_READ'
  EXPORTING
    I_VAL_MATNR          = '12001'
    I_VAL_WERKS          = '1200'
    I_VAL_CHARGE         =  '0000001619'
    I_LANGUAGE           = SY-LANGU
    I_DATE               = SY-DATUM
* IMPORTING
*   E_CLASS              =
*   E_CLASS_TYPE         =
 TABLES
   T_VAL_TAB            = valtab
   T_CHAR_TAB           = chartab
   T_ATT_TAB            = atttab
* EXCEPTIONS
*   NO_CLASS             = 1
*   INTERNAL_ERROR       = 2
*   NO_VALUES            = 3
*   NO_CHARS             = 4
*   OTHERS               = 5
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

loop at valtab.
endloop.

Any clue on where I am going wrong

Thanks

K.Kiran

Edited by: Kiran K on Sep 30, 2009 9:28 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,134

hi,

maybe, you should put leading zeros to material number ?

and try to remove comments from exceptions..


    I_VAL_MATNR          = '000000000000012001'
...
 EXCEPTIONS
   NO_CLASS             = 1
   INTERNAL_ERROR       = 2
   NO_VALUES            = 3
   NO_CHARS             = 4
   OTHERS               = 5
          .

reagrds,darek

3 REPLIES 3
Read only

Firoz_Ashraf
Contributor
0 Likes
1,134

Hi,

To read the values of characteristics of your batch, you must pass the characteristics name in the internal table 'valtab'.

For example if your batch '0000001619' has a charactristic 'CARBON' then add the following code before calling the FM.


valtab-atinn = 'CARBON'.
append valtab.

Regards,

Firoz.

Read only

Former Member
0 Likes
1,135

hi,

maybe, you should put leading zeros to material number ?

and try to remove comments from exceptions..


    I_VAL_MATNR          = '000000000000012001'
...
 EXCEPTIONS
   NO_CLASS             = 1
   INTERNAL_ERROR       = 2
   NO_VALUES            = 3
   NO_CHARS             = 4
   OTHERS               = 5
          .

reagrds,darek

Read only

0 Likes
1,134

Dariusz,

Yes you are right.

Thanks,

K.Kiran.