ME_PROCESSPO_CUST-GET_HEADER  get items? get accounting?

I am using BADI IF_EX_ME_PROCESS_PO_CUST to perform custom processing for P.O.s. In one scenario the only method that gets broken into is "GET_HEADER". I have the code below activated so far. My lack of OO knowledge is handicapping me. Ihaven't seemd to be able to find a clear cut answer online yet. I need to do two things:
1) Be able to read the line item details fields using what I have so far, or another way.
2) I need to read the accounting details to read the GL Number as well.
I would like to isolate all of this code in the "GET_HEADER" if possible. The code would help.
   Thank-You.
METHOD if_ex_me_process_po_cust~process_header.
DATA: rzcl_im_4ppi_glpo4 TYPE REF TO zcl_im_4ppi_glpo4.
DATA : ls_mepoheader TYPE mepoheader.
DATA: ls_item       TYPE purchase_order_items.
DATA: zcl_po        TYPE REF TO cl_po_header_handle_mm.
DATA: ls_items      TYPE purchase_order_item.
data: lt_mepoitem   TYPE STANDARD TABLE OF mepoitem.
data: ls_mepoitem   TYPE mepoitem.
*create the class instance from P.O. class interface
CREATE OBJECT rzcl_im_4ppi_glpo4.
*get header and item data
ls_mepoheader = im_header->get_data( ).
ls_item       = im_header->get_items( ).
*created a second instance from cl_po_header_handle_mm
CREATE OBJECT zcl_po exporting im_po_number = ls_mepoheader-ebeln.

Resolved it Thanks to a great link, Thank-You Vinod Kumar T:
http://wiki.sdn.sap.com/wiki/display/ABAP/PurchaseOrderDataExtractionusingABAPClasses#PurchaseOrderDataExtractionusingABAPClasses-RelatedContent
METHOD if_ex_me_process_po_cust~process_header.
  DATA: rzcl_im_4ppi_glpo4 TYPE REF TO zcl_im_4ppi_glpo4.
  DATA : lt_items      TYPE purchase_order_items.
  DATA : ls_mepoheader TYPE mepoheader.
  DATA: ls_item       TYPE purchase_order_items.
  DATA: zcl_po        TYPE REF TO cl_po_header_handle_mm.
  DATA: ls_items      TYPE purchase_order_item.
  DATA: lt_mepoitem   TYPE STANDARD TABLE OF mepoitem.
  DATA: ls_mepoitem   TYPE mepoitem.
  DATA: lt_accounting TYPE purchase_order_accountings.
  DATA: ls_accounting TYPE purchase_order_accounting.
  DATA: lt_mepoacct   TYPE STANDARD TABLE OF mepoaccounting.
  DATA: ls_mepoacct   TYPE mepoaccounting.
*create the class instance from P.O. class interface
  CREATE OBJECT rzcl_im_4ppi_glpo4.
*get header and item data
  ls_mepoheader = im_header->get_data( ).
*  ls_item       = im_header->get_items( ).
*created a second instance from cl_po_header_handle_mm
  CREATE OBJECT zcl_po
    EXPORTING
      im_po_number = ls_mepoheader-ebeln.
* Extract PO Item Information **
  REFRESH : lt_items.
  lt_items = zcl_po->if_purchase_order_mm~get_items( ).
  LOOP AT lt_items INTO ls_items.
    ls_mepoitem = ls_items-item->get_data( ).
    APPEND ls_mepoitem TO lt_mepoitem.
  ENDLOOP.
** Extract PO Account Assignments
  REFRESH : lt_accounting.
  lt_accounting = ls_items-item->get_accountings( ).
  LOOP AT lt_accounting INTO ls_accounting.
    ls_mepoacct = ls_accounting-accounting->get_data( ).
    APPEND ls_mepoacct TO lt_mepoacct.
  ENDLOOP.
ENDMETHOD.

Similar Messages

  • Get accounting information

    I have a function as follows to extract the relationship of DN, Invoice and SO, but i want to get accounting information, so i loop the BSEG table, then pass the DN, SO and SO Item to function. The question is when same delivery refer to same so and so item, that will duplication the record, becuase i only pass delivery no, so and so item to function, i think i should pass delivery item to the function. but the BSEG without store those information. How can i do that. Thanks
    FORM   .... USING P_VBELN TYPE LIPS-VBELN
                                P_VBEL2 TYPE BSEG-VBEL2
                                P_POSN2 TYPE BSEG-POSN2.
    SELECT ...
    INTO TABLE ITAB
                          FROM
                          LIPS AS T1
                          INNER JOIN VBRP AS T2 ON T1VBELN = T2VGBEL AND
                                                   T1POSNR = T2VGPOS
                          INNER JOIN VBAP AS T3 ON T1VGBEL = T3VBELN AND
                                                   T1VGPOS = T3POSNR
                          INNER JOIN VBRK AS T4 ON T2VBELN = T4VBELN
                          INNER JOIN VBAK AS T5 ON T3VBELN = T5VBELN
                          WHERE
                          T1~VBELN = P_VBELN AND
                          T3~VBELN = P_VBEL2 AND
                          T3~POSNR = P_POSN2
    END FORM.

    Hi,
    If at all you need the Accounting Doc information w.r.to Sales doc's i.e SO, DN and Invoice, I suggest not to use the BSEG table at all.
    You can get all the related Accounting Info from BSID and BSAD table.
    Pass the KUNNR Customer and the Related Billing Doc(invoice No) VBELn field for these tables you will get the belnr (acc Doc). With this belnr if you need further info get them from BKPF and BSEG.
    I hope you know the linkage between Bill Doc(invoice) Del Note DN and SO.
    VBRP -VGBELl is the Del doc No VGPOS is the del item and AUBEL is the SO no and AUPOS is the SO item.
    Or youc an use the VBFA table for the doc flow between the DN, SO and Invoice.
    Regards,
    Anji

  • When trying to activate iCloud on iPhone and iPad I get "account not verified... check your email." Can't verify account on wither device

    when trying to activate iCloud on iPhone and iPad I get "account not verified... check your email." Can't verify account on either device.
    Can't verify device on website either.

    Welcome to the Apple Community.
    Put in a request for another verification e-mail to be sent to you.
    Start here, change your country if necessary and go to manage your account.
    Also check your Mail rules and filtering, the verification mail may be going to a junk folder or even being deleted altogether. You may also wish to contact your mail provider to see if their spam filters are removing the email before it gets to you.

  • Not getting Accounting Document during PGI

    Hi
    IN MTO Scenerio while doing PGI iam not getting Accounting document for Material Document.Valution class for the material is 7920(Finished Goods)
    Can Any body help me on this issue.

    Go to OMJJ, key in movement type 601 and execute.  Again double click on "Account Grouping and ensure the following values are maintained
    MTyp::Spl::Val.Upd:::Qty upd:::Mvt::Cns:::Val strg:::Cn:::TEKey:::Acct modif::Chk acct.***
    601::::::E::::::X:::::::::::::::X:::::::::::::::::::::::::WA01:::::2::::GBB::::::::::VAX::::::::::X
    601::::::E::::::X:::::::::::::::X:::::::::::::::::::::::::WA01:::::3::::PRD::::::::::PRA
    601::::::E::::::X::::::::::::::::X::::::L::::::::::::::::WA01:::::2::::GBB::::::::::VAX::::::::::X
    601::::::E::::::X::::::::::::::::X::::::L::::::::::::::::WA01:::::3::::PRD::::::::::PRA
    601::::::E::::::X::::::::::::::::X:::::::L::::::V:::::::WA01:::::2::::GBB::::::::::VAY::::::::::X
    601::::::E::::::X::::::::::::::::X:::::::L::::::V:::::::WA01:::::3::::PRD::::::::::PRA
    thanks
    G. Lakshmipathi

  • HT5527 Hello, I had 25Go transfered from MobileMe, skimmed down to 5Go now. I cleaned my emails. From mail, on my mac, 'get account information' shows less than 1 Go... From System preferences/iCloud, up to yesterday it showed 12Go... I don't understand!

    Hello, I had 25Go transfered from MobileMe, skimmed down to 5Go now. I cleaned my emails. From mail, on my mac, 'get account information' shows less than 1 Go... From System preferences/iCloud, up to yesterday it showed 12Go...
    I don't understand!
    These information are contradctory. Now my account is locked.
    What Am I supposed to do???
    thanks for your help!

    Well as far as I can tell the only developed alternative to Apple is Microsoft, sure you want to go there?
    iCloud (and Mobile Me before it) are consumer level systems, working correctly they are a poor choice for business use, if you want to stay all Mac try Zimbra if you can let a little Microsoft in the mix use Microsoft Exchange (Mail, iCal & Address Book are compatible as clients), hosted Exchange systems cost about $10 per month.
    Or try to fix what is wrong with your installation (which is clearly not running as it should)

  • Icloud: i would like to enable it but I get 'Account not verified', when I check my emails there is no email to verify it

    when I try to enable my icloud I get 'Account not verified - check email'. But no email is received

    It could be that the site is trying to determine your location to enable downloading from nearest to your location. So sometimes the download confirmation box may take some time to appear.
    You can also try this direct link: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/9.0.1/win32/en-US/
    '''Firefox Setup 9.0.1.exe''' is the file. This is the US English version. To look for other versions, click '''Parent Directory''' to traverse back.

  • Mail 7.0 - "Get Account Info" listing - a bug?

    I very frequently use the "Get Account Info" listing (via the 'gearwheel' at the bottom of the Maibox list) to remove unnecessary mail from the server to save downloading it yet again to my wife's little G4 iBook. However, with Mavericks they seem to have messed up the window as the listing now has no order and I'm unable to set it to any order - I prefer date - although it sometimes lists as size in descending order. A bug?

    No luck, unfortunetly.  I've even restarted the whole computer.  They are usually still there, and sometimes, even older messages that I deleted from the drafts folder a long time ago, reappear as well.  I've also deleted the account from Mail and set it up from scratch several times hoping that would work, but it failed as well.

  • I am getting account not verified when setting up icloud. I check my email and nothing shows up in inbox or junk. What am I doing wrong?

    I am getting account not verified when trying to set up icloud on my iphone. I check my email and there is nothing in my inbox or junk. What am I doing wrong?

    Welcome to the Apple Community.
    Put in a request for another verification e-mail to be sent to you.
    Start here, change your country if necessary and go to manage your account.
    Also check your Mail rules and filtering, the verification mail may be going to a junk folder or even being deleted altogether. You may also wish to contact your mail provider to see if their spam filters are removing the email before it gets to you.

  • Getting Account Update Emails asking for SIN numbers, is this legit?

    Getting Account Update Emails asking for SIN numbers, is this legit? Should state it is coming from Itunes and Icloud apple store.

    No. Forward them to [email protected] and then delete them.
    (99881)

  • How to get Accounting document number from billing document number

    Hi,
    How to get Accounting document number from billing document number i.e. from VBAK- VBELN.
    Cheta Pant

    Hi,
    VBAK is the Sale Order header table, Billing document table is VBRK.
    Sales tables (VBAK,VBAP,VBRP,VBRK) do not store accounting document numbers.
    You do other way around. Just go to SE16 and enter the Billing document number in field Billing document VBELN in BSEG or BSID or BSAD table and execute, you will find the accounting document number.
    If you just want collect this information once then you can use table BSEG, but if you think to develope a report then use table BSID and BSAD.
    Regards,
    Chintan Joshi

  • How do I get account when forgot security questions?

    How do I get account when forgot security questions?

    select manage account at appleid.apple.com then select passwords and security, you can reset questions through your email there

  • Checking emails using Get Account Info function

    When using the "Get Account Info" function to check and delete emails on POP servers, the first message in the display list always shows no information regarding that message.
    Resorting the list has no effect. While it will allow me to determine what the "mystery message" is by moving it to a different location on the list, the top message in the resorted list remains blank as far any information about it is concerned. The two screen shots show what I'm talking about. The first one is of the original list - the second one after changing the sort. As you can see, in both cases, the only information available about the message is the date stamp.
    This is an absolutely reliable occurrence with POP servers. It may also happen on IMAP servers, but I have no email accounts on IMAP servers with which to test it.  I've submitted a bug report to Apple, but if anyone here has any suggestions, it would be much appreciated.

    It happens across all accounts. Anyone here should be able to replicate this just by checking their email on the server using the "get account info".

  • I keep getting Account Action Required:

    I keep getting Account Action Required: couldn't sign in to google accounts. I have tried all the suggestions. I recently changed my google password. Is there somewhere in setting I need to update?

    Try going into app mgr settings and force stop Gmail and playstore. Then try those see if you get those errors

  • Relation between Billing  line Item and Accounting doc entries

    Hi all
    when r line items in Accounting doc gets generated for a billing doc.
    for ex. if there exists a Billing Doc with 2 lines
    is there any relation to the item in the Billing Doc
    to the Accounting doc line items.
    thanks

    Hi,
    In some situation it is possible that there is a link but in the most situation you use summarization to minalize the number of line items created by invoice (like one line for VAT, general discounts). The total ammount from the customer is the same as on the billing document.
    When you want to have details by line you can found them in CO-PA.
    Paul

  • ICR Process 003 Open Items GL accounts

    Hello,
    I have a problem getting our open items GL accounts to be selected under Process 003 using transaction FBICS3.  I have run FBIC and included open items GL accounts in Process 003 and have run FBIC031 and have unchecked tables FBICRC003A (should I check table FBICRC001A?).  I have run FBIC004 successfully and have removed ledger 0L from process 003 in FBIC010.  I have checked the Local company field for all companies in FBIC032.  Finally, I have set up the Data Sets for our GL accounts and customers and vendors and set up the groups and sub-groups. 
    When I run the Select Documents FBICS3 I get all my IC cusotmer and vendor documents, however get an error message for the Open Item GL accounts that says the "group account could not be determined".  The long text says to "complete the assignment of the operational accounts to the group accounts".  What did I miss and where do I do this assignment?
    Gary Pajkos

    Hello Gary,
    Actually you can include GL open items in process 003 (and vice versa). In FBIC032 you create a new entry for each company and select the data source GL Open Items.
    Best regards,
    Ralph

Maybe you are looking for

  • How do I save a PDF as v1.4 in Acrobat Pro?

    Hello, I am currently using the Adobe Acrobat X Pro. I am being sent documents that I must change to v1.4. So far I have been sent v1.3, v1.5, v1.6, v 1.7. I MUST change the versions of the PDFs provided to v1.4 because I then send the documents to s

  • External Storage units to be entered in the Creation of Transfer Order

    Hi Experts, We have a scenerio where the business creates the Storage units in advance, creates the PO and assigns ithe SU's to the Purchase Order in the custom table. Then creates the Goods reciept using a BAPI which creates a Transfer requirement.

  • Itunes gives needs to close Windows message when trying to Burn DVD or Sync

    I have a 60G Video Ipod I right click on the my playlist and select Burn Playlist to Disc. It then asks if I want to do a data DVD, I click yes and then it starts checking Playlist. When the bar almost reaches the end the windows message pops up and

  • SSH lost connection

    Hi, Today, at 14:00 I lost the SSH connection with my Server. I can connect with it by Server Admin but I dont see the anything wrong. Only that the logs of the System.log and Secure.log are until 14.10 .... and in that moment the server did not perm

  • Lightroom 5 in Fotografipaket för Photoshop CC

    Do I have to reinstall Lightroom 5 after I bought Photoshop CC and LIgtroom 5 in Creative Cloud?