2014 Dec 18 10:29 AM
Hi,
I am working with one Badi implementation in development system.
Badi: MM_RESERVATION_BADI and
Implementation name :ZZ_MM_RESERVATION.
Below is my coding:
method IF_EX_MB_RESERVATION_BADI~DATA_CHECK.
SELECT SINGLE * FROM MARC WHERE MATNR EQ IS_RESB-MATNR AND WERKS EQ IS_RESB-WERKS.
IF MARC-DISMM EQ 'ND'. "(DISMM-MRP type is equal ND)
MESAAGE 'This material has MRP TYPE ND,please contact Emad-Warehouse',E.
endmethod.
Can some throw light on this issue,please?
Note:I am new to Badi development.
with Regards,
2014 Dec 18 10:36 AM
Dear Mr. Hussain,
You need to define a data-structure, which has the same structure like the table. In this structure you have to assign the data of the select.
Your code could look like:
Data: ls_marc type marc.
Select single * from marc into ls_marc where...
Please keep in mind that select * does not have a good performance. Better select only the needed attributes.
Kind regards,
Benjamin
2014 Dec 18 10:36 AM
Dear Mr. Hussain,
You need to define a data-structure, which has the same structure like the table. In this structure you have to assign the data of the select.
Your code could look like:
Data: ls_marc type marc.
Select single * from marc into ls_marc where...
Please keep in mind that select * does not have a good performance. Better select only the needed attributes.
Kind regards,
Benjamin
2014 Dec 18 10:38 AM
hi
Please explore more your problem
correct your select
SELECT * UP TO 1 ROW INTO TABLE ITAB
FROM MARC
WHERE MATNR EQ IS_RESB-MATNR
AND WERKS EQ IS_RESB-WERKS.
Regards
Ashraf Usmani