SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Partner check



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ММ
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1639

PostPosted: Thu Oct 11, 2007 11:47 pm    Post subject: Partner check Reply with quote

The FM you are looking for is (most likely) ME_PROCESS_PO_CUST.

If you want to check data then the method of choice IF_EX_ME_PROCESS_PO_CUST~CHECK (closing check).

The CHECK method provides you with IM_HEADER (IF_PURCHASE_ORDER_MM). If you look at the implementing class CL_PO_HEADER_HANDLE_MM you have a method IF_PURCHASING_DOCUMENT~GET_PARTNERS available.

Please search the SDN forums for postings related to ME_PROCESS_PO_CUST. I have posted several answers to this topic.
Briefly, here is the way to go:

Code:
method IF_EX_ME_PROCESS_PO_CUST~CHECK.
 
  DATA:
    ls_header      TYPE MEPOHEADER,
    lt_partners     TYPE MMPUR_PARTNER_ALL_TAB,
    ls_partner      LIKE LINE OF lt_partners,
    lo_po_doc     TYPE REF TO IF_PURCHASING_DOCUMENT.
 
 
  ls_header = im_header->get_data( ).  " header details
 
  lo_po_doc ?= im_header.  " casting to purchase document
 
  lt_partners = lo_po_doc->get_partners( ).
 
  LOOP AT lt_partners INTO ls_partner
                                 WHERE ( parvw = '..'
                                 AND         parno = ls_header-lifnr.  " vendor
    EXIT.
  ENDLOOP.
  IF ( syst-subrc = 0 ).
   " partner = vendor -> do something, e.g.
 
    ch_failed = 'X'.
  ENDIF.
 
endmethod.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ММ All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.