2014 Feb 26 11:41 PM
Hi,
I have a problem with this function, I have an internal table with many materials, I make a loop calling this function with each material inside the loop.
The problem is that inside this function there are many global variables that in the second loop adquires the value 'X', so that the function doesn't return anything about the material.
Why these variable adquires the value X?
Thanks so mucho for your help.
Hi,
I have a problem with this function, I have an internal table with many materials, I make a loop calling this function with each material inside the loop.
The problem is that inside this function there are many global variables that in the second loop adquires the value 'X', so that the function doesn't return anything about the material.
Why these variable adquires the value X?
Thanks so mucho for your help.
2014 Feb 27 12:04 AM
Try calling FM BUFFER_REFRESH_ALL after the FM CRS_MATERIAL_READ_ALL
is called, so that global data is refreshed and you get desired results...
2014 Feb 27 12:22 AM
it doesn't work.
CALL FUNCTION 'CRS_MATERIAL_READ_ALL'
EXPORTING
iv_matnr = pmatnr
TABLES
et_mvke = lt_mvke
et_mbew = lt_mbew
et_marc = lt_marc
et_mard = lt_mard
et_makt = lt_makt
et_marm = lt_marm
et_mean = lt_mean
et_mlan = lt_mlan
et_icdtxt_material = lt_cdtxt.
CALL FUNCTION 'BUFFER_REFRESH_ALL'.
I also use this function to know if the material exists, and when this is true the function above doesn't return anything. Because of the global variable inside the function CRS_MATERIAL_READ_ALL than change its value to 'X'
CALL FUNCTION 'BAPI_MATERIAL_EXISTENCECHECK'
EXPORTING
material = pmatnr
IMPORTING
deletion_flag = bapimatall-del_flag
return = bapireturn1.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |