‎2013 May 11 10:43 AM
HI Experts
Am Using Check method in ME_PROCESS_REQ_CUST badi to validate item text , but i face problem that when i retrieve Purchase Requisition Number(BANFN) to read the text like this :
CALL METHOD
IM_HEADER->GET_DATA
receiving
RE_DATA = ls_headerval . " Header Data
BANFN come as rubbesh data like '# 1'
So i have tried with method post , it retrieved it fine , put i couldnt make validation in this method because transaction appear in display mode after excute method.
So please help me which method can i use it to validate PR before saving , an d it enable me to read PR number?
Regards
Ghadeer
‎2013 May 13 7:27 AM
Hello Ghadeer,
When you create a new RP, in the check method, the number of PR is not generated.
If you need to validate the header text, i guess you can use
IM_HEADER->GET_TEXT instead of GET_DATA
regards,Charlie
‎2013 May 13 7:27 AM
Hello Ghadeer,
When you create a new RP, in the check method, the number of PR is not generated.
If you need to validate the header text, i guess you can use
IM_HEADER->GET_TEXT instead of GET_DATA
regards,Charlie
‎2013 May 13 8:02 AM
Hello Charlie
Thanks for your reply
I need to validate item text for each item , I have used READ_TEXT Function module to read it , so i need to concate BANFN and BNFPO to get its name
Kindly Is there and method like IM_HEADER->GET_TEXT , to read item text ?
Regards
Ghadeer
‎2013 May 13 8:30 AM
Hello Ghadeer,
In CHECK, you can use im_header->get_items to return a table of item references.
Loop the table and use IF_LONGTEXTS_MM~GET_TEXT to get the item text.
I guess when the text is not saved to DB, READ_TEXT does not work to return a expected content.
In your case, i dont think using READ_TEXT is a good idea.
Regards,
Charlie
‎2013 May 13 9:05 AM