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

Get order number within process_item method

Former Member
0 Likes
898

I have en implemented badi ZME_PROCESS_PO_CUST.

Within process_item method I do: ws_item = im_item->get_data( ).

In order to have the PO line´s information in ws_item.

When knttp field has value 'F' and therefore user inserts an orden number.

How could I get this order number? It´s not in ws_item.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

eduardo_hinojosa
Active Contributor
0 Likes
854

Hi

Try in method POST with the parameter IM_EBELN.

Regards

Eduardo

I have en implemented badi ZME_PROCESS_PO_CUST.

Within process_item method I do: ws_item = im_item->get_data( ).

In order to have the PO line´s information in ws_item.

When knttp field has value 'F' and therefore user inserts an orden number.

How could I get this order number? It´s not in ws_item.

Thanks in advance.

4 REPLIES 4
Read only

eduardo_hinojosa
Active Contributor
0 Likes
855

Hi

Try in method POST with the parameter IM_EBELN.

Regards

Eduardo

Read only

0 Likes
854

hi!!

I need the value of the order number in process_item method.

Thanks.

Read only

0 Likes
854

if u want to get order number in process_item method use below code,

DATA LS_ACCOUNTING TYPE MEPOACCOUNTING,

DATA LT_ACCOUNTINGS TYPE PURCHASE_ORDER_ACCOUNTINGS.

DATA LINE_ACCOUNTING TYPE PURCHASE_ORDER_ACCOUNTING.

DATA LS_ACC TYPE REF TO IF_PURCHASE_ORDER_ITEM_MM .

DATA ORDER_NUMBER TYPE AUFNR.

LT_ACCOUNTINGS = IM_ITEM->GET_ACCOUNTINGS( ).

LOOP AT LT_ACCOUNTINGS INTO LINE_ACCOUNTING.

LS_ACCOUNTING = LINE_ACCOUNTING-ACCOUNTING->GET_DATA( ).

"order number is there in LS_ACCOUNTING STRUCTURE.

DO u r process.

<Reward request removed by moderator>

Edited by: Vinod Kumar on Nov 5, 2011 9:43 AM

Read only

0 Likes
854

hi!!

Thanks. I have tried and it´s fine. Nevertheless I think it´s not neccessary to do a loop; I think ti´s enaugh doing once

LS_ACCOUNTING = LINE_ACCOUNTING-ACCOUNTING->GET_DATA( ).

Problem solved.