I am trying to get the number of condition records in a purchase info record.
using ME_GET_INFORECORD_CONDITIONS and also ME_GET_INFORECORD_CONDITIONS_1.
ME_GET_INFORECORD_CONDITIONS_1 gives me the correct values when I try to test the FM.
What is the diff between these 2 FMs.
But when I use ME_GET_INFORECORD_CONDITIONS_1 in a report, it is not giving a correct value.
Following is the code:
DATA: IT_KONP TYPE KONP OCCURS 0 WITH HEADER LINE,
WA_KONP TYPE KONP.
DATA: coun TYPE i VALUE 0.
"Get the number of condition record - should be useful in BDC call.
CALL FUNCTION 'ME_GET_INFORECORD_CONDITIONS_1'
I_EKORG = 'U001'
I_ESOKZ = '0'
I_INFNR = '5300000320'
I_LIFNR = '200524'
I_MATKL = '001'
I_MATNR = '80141300'
I_WERKS = 'L001'
* I_VABME =
* I_BSTME =
TKONP = IT_KONP.
LOOP AT IT_KONP.
ADD 1 to coun.
WRITE: / coun.
The variable coun is always Zero.