Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ME_PROCESS_REQ_CUST Check Method

Former Member
0 Likes
2,661

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,633

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

4 REPLIES 4
Read only

Former Member
0 Likes
1,634

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

Read only

0 Likes
1,633

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

Read only

0 Likes
1,633

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

Read only

0 Likes
1,633

Thanks Alot you solved my problem