2009 Jan 27 5:46 AM
Hi friends,
I have a requirement, where in i am creating a screen exit for ME51N.I am using MEREQ001 enhancement for this.It is working fine, but i am to get data in to this so as to write any code.For that i am using the function exit EXIT_SAPLMEREQ_001 in that same enhancement(thought of doing export and import).
But the data is declared in this way..
REFERENCE(IM_REQ_ITEM) TYPE REF TO IF_PURCHASE_REQUISITION_ITEM
so now it is having a method GET_DATA in which i have all the parameters required.
can anyone please tell me how to read this data...
Regards,
Thoufique.
2009 Jan 27 6:47 AM
Hello Thoufique
You may have a look at my Wiki posting
[Accessing the Inacessible - Local Classes within Global Classes |https://wiki.sdn.sap.com/wiki/display/ABAP/AccessingtheInacessible-LocalClasseswithinGlobalClasses]
and the links mentioned therein.
The direct answer to your question is:
DATA: ls_data TYPE MEREQ_ITEM.
ls_data = im_req_item->get_data( ). " function method call
Regards
Uwe
Hi friends,
I have a requirement, where in i am creating a screen exit for ME51N.I am using MEREQ001 enhancement for this.It is working fine, but i am to get data in to this so as to write any code.For that i am using the function exit EXIT_SAPLMEREQ_001 in that same enhancement(thought of doing export and import).
But the data is declared in this way..
REFERENCE(IM_REQ_ITEM) TYPE REF TO IF_PURCHASE_REQUISITION_ITEM
so now it is having a method GET_DATA in which i have all the parameters required.
can anyone please tell me how to read this data...
Regards,
Thoufique.
2009 Jan 27 6:47 AM
Hello Thoufique
You may have a look at my Wiki posting
[Accessing the Inacessible - Local Classes within Global Classes |https://wiki.sdn.sap.com/wiki/display/ABAP/AccessingtheInacessible-LocalClasseswithinGlobalClasses]
and the links mentioned therein.
The direct answer to your question is:
DATA: ls_data TYPE MEREQ_ITEM.
ls_data = im_req_item->get_data( ). " function method call
Regards
Uwe
2009 Jan 27 7:45 AM
Hi Uwe Schieferstein,
Thanks for your valuable answer.
I also need to get data from method GET_REQUISITION(item data) which is of type IF_PURCHASE_REQUISITION.
(RE_REQUISITION Returning Type Ref To IF_PURCHASE_REQUISITION)
so i wrote
CALL METHOD im_req_item->get_requisition
RECEIVING
re_requisition = re_requisition.
now, If i get in to IF_PURCHASE_REQUISITION and see the methods i have a method called GET_ITEMS and i need to get data from RE_ITEMS parameter which is of type MPUR_REQUISITION_ITEMS,
so i wrote
CALL METHOD re_requisition->get_items
RECEIVING
re_items = re_items.
but the output is coming like this
|
|
MMPUR_REQUISITION_ITEM is a line type and this is again of type IF_PURCHASE_REQUISITION_ITEM.which is where i started.
so this is getting recursive and i am unable to get item data.
can you plese help??
Regards,
Thoufique.
2009 Jan 27 9:46 AM
Hi Uwe Schieferstein,
Thanks a lot fo the attachment of your wiki posting.
I was code to do the same in the userexit.But it was throwing me error maessages.
Now i have coded the same in the badi and it is working fine.
Thanks a lot for the help.
Regards,
Thoufique.
2009 Jan 27 12:22 PM
Hello Thoufique
You are welcome.
And if my Wiki coding proves to be useful for other people as well that's encouraging as well.
Regards
Uwe
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |