‎2009 Sep 30 7:17 AM
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
‎2009 Sep 30 8:54 AM
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
‎2009 Sep 30 8:53 AM
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.
‎2009 Sep 30 8:54 AM
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
‎2009 Sep 30 10:08 AM