Bapi to read customer's partners

Hi,
I have to read a customer's ship-to partners with Bapis. Which Bapi should I use?
Thanks
Krisztian

Hi,
U can try using FM SD_PARTNER_READ. But is is not a RFC enabled FM. If u want BAPI, I think no FM is there. We need to do a small work around using BAPI_SALESORDER_CHANGE. We can just process this without updating any data of SO. Then at return all the SO data will be stored in appropriate tables of FM. U can use that...
Hope it helps u...
Sreedhar

Similar Messages

  • Bapi to read 'customer master'

    Hi,
    I have some kind of customer hierarchy defined in the 'Partner Functions' for a customer. Example: cust01 (the 'customer-master') is the sold-to, bill-to, payer, ship-to partner, and it has 3 more ship-to partners (cust11, cust12, cust13). It means that cust1x customers are under cust01 in the hierarchy, but this relation is only defined in the 'Partner Functions' of cust01.
    My problem is to find a Bapi or an RFC enabled Function Module to look-up the customer-master for the ship-to customers.
    I hope it's clear, and someone can help me.
    Thanks,
    Krisztian

    Hi Lanka,
    I use the import parameters like this:
    FIF_KORG  0001
    FIF_VTWEG  01
    FIF_SPART  01
    FIF_KUNNR  cust11
    FIF_FILTER  (WE or anything)
    The result is cust11.
    It's better to write this in detail:
    The partner functions for cust01 are:
    SP  cust01
    BP  cust01
    PY  cust01
    SH  cust01
    SH  cust11
    SH  cust12
    SH  cust13
    The partner functions for cust11 are:
    SP  cust11
    BP  cust11
    PY  cust11
    SH  cust11
    (same for cust12 and cust13)
    So, I need a function module that has the input parameter 'cust11' and gives the result that cust01 has him as a ship-to.
    Krisztian

  • BAPI for Change Customer

    Hi Experts,
    We have a requirement to change the details of a customer. We are using BAPI, "BAPI_CUSTOMER_CHANGEFROMDATA". Change is happening when we try to change details like name, But when we try to change 'country' field, we are getting error saying  "Personal address diffrent from comapany address; change not allowed"..... Can anybody help me with this,,, or can somebody suggest any other BAPI for change customer....
    Thanks and regards,
    Mahendra R

    Hi Mahendra,
    CHek the link below[using BAPI_CUSTOMER_CHANGEFROMDATA1;

  • BAPI to read classification of Material Variant

    Hi experts,
    In our customer we are using material with a reference product KMAT (Material Variant), and we need a BAPI to read the configuration of the materials.
    Does anyone knows which BAPI can we use to read the configuration of the material variant?
    We tried to use the BAPI_PRDSRVAPS_GETCLASSES, but for material variant it didn't work, just to products that doesn't have a KMAT related.
    Thanks in advanced
    Thiago Cyrillo

    Thiago,
    Why dont you use a class like /SAPAPO/CL_MC01_CCV and method like GET_SINGLE_CHARVAL?
    Kedar

  • Combine of 3 BAPIs into one Custom BAPI

    Hi All,
    I have a requirement to combine 3 standard BAPI into a Custom BAPI.
    What is the procedure or the steps that has to be followed to do this.
    Help and Suggestions will be much Appreciated.
    Thanks.
    Ram.

    Hi,
       Please check the source code of a function module I have created where I have called a BAPI, please check the parameters I have I have passed in the commented format on the top.
    FUNCTION zvmat_avilability_check.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(SALESDOCUMENT) TYPE  BAPIVBELN-VBELN
    *"  EXPORTING
    *"     VALUE(ENDLEADTME) TYPE  BAPICM61M-WZTER
    *"     VALUE(AV_QTY_PLT) TYPE  BAPICM61V-WKBST
    *"     VALUE(DIALOGFLAG) TYPE  BAPICM61V-DIAFL
    *"  TABLES
    *"      WMDVSX STRUCTURE  BAPIWMDVS
    *"      WMDVEX STRUCTURE  BAPIWMDVE
      DATA : p_ans TYPE c,
             v_txt1 TYPE char35,
             v_txt2 TYPE char10,
             v_txt TYPE char50,
             v_txt3 TYPE char35,
             v_txt4 TYPE char10,
             v_txt5 TYPE char50.
    parameters LIKE spar OCCURS 0 WITH HEADER LINE.
      DATA: v_usrlines TYPE i,
            v_begrow TYPE sy-curow VALUE 1,
            v_ans LIKE sy-tabix.
      TYPES: BEGIN OF ty_wf,
             plant TYPE werks_d,
             material TYPE matnr,
             unit TYPE meinh,
             lgort TYPE lgort_d,
             KWMENG TYPE KWMENG,
             END OF ty_wf.
      TYPES: BEGIN OF ty_final,
             material TYPE matnr,
             plant TYPE werks_d,
             unit TYPE meinh,
             KWMENG TYPE KWMENG,
             av_qty_plt TYPE bapicm61v-wkbst,
             END OF ty_final.
      DATA: wa_wf TYPE ty_wf,
            wa_final TYPE ty_final.
      DATA: it_wf TYPE STANDARD TABLE OF ty_wf,
            it_final TYPE STANDARD TABLE OF ty_final.
      CLEAR wa_wf.
      SELECT  werks
              matnr
              meins
              lgort
              KWMENG
              FROM vbap
              INTO TABLE it_wf
              WHERE vbeln EQ salesdocument.
      IF sy-subrc EQ 0.
        LOOP AT it_wf INTO wa_wf.
          CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
            EXPORTING
              plant                    = wa_wf-plant
              material                 = wa_wf-material
              unit                     = wa_wf-unit
      CHECK_RULE               =
              stge_loc                 = wa_wf-lgort
      BATCH                    =
      CUSTOMER                 =
      DOC_NUMBER               =
      ITM_NUMBER               =
      WBS_ELEM                 =
      STOCK_IND                =
      DEC_FOR_ROUNDING         =
      DEC_FOR_ROUNDING_X       =
      READ_ATP_LOCK            =
      READ_ATP_LOCK_X          =
      MATERIAL_EVG             =
           IMPORTING
             endleadtme               = endleadtme
             av_qty_plt               = av_qty_plt
             dialogflag               = dialogflag
      RETURN                   =
            TABLES
              wmdvsx                   = wmdvsx
              wmdvex                   = wmdvex .
          wa_final-plant  = wa_wf-plant.
          wa_final-material  = wa_wf-material.
          wa_final-unit  = wa_wf-unit.
          wa_final-av_qty_plt  = av_qty_plt.
          wa_final-KWMENG = wa_wf-KWMENG.
          APPEND wa_final TO it_final.
        ENDLOOP.
        DESCRIBE TABLE it_final LINES v_usrlines.
        v_usrlines = v_begrow + v_usrlines.
        CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
          EXPORTING
            endpos_col   = 60
            endpos_row   = v_usrlines
            startpos_col = 1
            startpos_row = v_begrow
            titletext    = 'USER DISPLAY'
          IMPORTING
            choise       = v_ans
          TABLES
            valuetab     = it_final
          EXCEPTIONS
            break_off    = 1
            OTHERS       = 2.
        IF sy-subrc EQ 0.
          READ TABLE it_final INTO wa_final INDEX v_ans.
          v_txt1 = 'MATERIAL QUANTITY AVAILABLE IS'.
          v_txt2 = wa_final-av_qty_plt.
           v_txt3 = 'MATERIAL QUANTITY ORDERED'.
          v_txt4 = wa_final-KWMENG.
          CONCATENATE v_txt1 v_txt2 INTO v_txt.
          CONCATENATE v_txt3 v_txt4 INTO v_txt5.
          CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
            EXPORTING
             titel              = 'MATERIAL AVAILABILTY STATUS'
              textline1          = v_txt5
              TEXTLINE2          = v_txt
             start_column       = 25
             start_row          = 6.
        ENDIF.
      ELSE.
        MESSAGE i001(zd) WITH 'No material ordered for for the current sales order'.
      ENDIF.
    ENDFUNCTION.
    With best wishes,
    Murthy.

  • BAPI function create Customer master(T-code XD01)??

    Hi All,
    i want to create BDC program using BAPI function create Customer master(upload  customer master),but i do not know which BAPI function for create Customer master.
    Does anyone know,please tell me which BAPI function i can use?
    Thanks.
    Van Dung

    Hi Amit Gujargoud,
    I can use LSMW  upload the data from legacy system to sap system., but my manager he did not want to use LSMW.He wants to use BAPI function for upload customer master.
    I saw this BAPI function create customer master : BAPI_CUSTOMER_CREATEFROMDATA1,
    BAPI_CUSTOMER_CREATEFROMDATA,
    it is not enough field for input data.
    example : if i want input : customer code,company code, Sales organiration,Distribution channel,Division.
    So This BAPI function have not paramaters input this field.
    Thanks for your answer
    Van Dung.

  • BAPI to read R/3 messages

    Hi,
    Are there any standard bapis to read r/3 messages (internal/customer) from abap code?
    Thanks
    Paul

    Hi Eugeny,
    I have used the SAP Connector Framework to connect to R/3, get data from a BAPI and then display the data in a HTMLB tableview.
    Have a look at the link below to get information about how to connect to a BAPI from a Java iview.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/using sap adapter for connector framework
    Cheers
    Richard

  • BAPI to read and change schedule lines in APO

    Hello experts,
    We want to firm schedule lines inside the firm zone of the APO procurement scheduling agreements with a daily job. For this we are trying to use BAPI BAPI_POSRVAPS_GETLIST3 and BAPI_POSRVAPS_SAVEMULTI3. The getlist one does not return schedule lines, it returns purchase orders and purchase requisitions. Are these the right bapis to read and change schedule lines in APO? or is there anyother one we can use?
    Thanks and regards,
    Ergul

    Hi,
             You can use the below code to read the schedule lines.
    Checking a session exists
        CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_GET'
          IMPORTING
            ev_simsession = gv_sims
            es_gen_params = gv_params.
    If not create a new session and read it
        IF gv_sims IS INITIAL.
          CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_CREATE'
            IMPORTING
              ev_simsession = gv_sims.
          CALL FUNCTION '/SAPAPO/RRP_SIMSESSION_GET'
            IMPORTING
              ev_simsession = gv_sims
              es_gen_params = gv_params.
          g_cre_chk = 'X'.
        ENDIF.
    CALL FUNCTION '/SAPAPO/CMDS_TPSRC_GET'
        EXPORTING
          iv_ebeln                       = p_l_t_acknh_ebeln
          iv_ebelp                       = p_l_t_acknh_ebelp
        TABLES
          et_tpsrc_all                   = lt_tpsrc
        EXCEPTIONS
          matid_not_found                = 1
          locfrom_not_found              = 2
          locto_not_found                = 3
          scheduling_agreement_not_found = 4
          error_selecting_schedagreement = 5
          OTHERS                         = 6.
      IF sy-subrc = 0.
    reading the scheduling agreement records
        READ TABLE lt_tpsrc INTO ls_tpsrc INDEX 1.
        CALL FUNCTION '/SAPAPO/PWB_BZQID_GET_ORDER'
          EXPORTING
            iv_simid               = '000'
            iv_bzqid               = ls_tpsrc-bzqid
          IMPORTING
            ev_ordid               = lv_iordid
          EXCEPTIONS
            lc_connect_failed      = 1
            no_elements            = 2
            unit_conversion_failed = 3
            OTHERS                 = 4.
        IF sy-subrc = 0.
          CALL FUNCTION '/SAPAPO/PWB_GET_RELATED_ORDERS'
            EXPORTING
              iv_ordid             = lv_iordid
              iv_order_type     = '16'
              iv_simid            = '000'
            IMPORTING
              ev_ordid          = lv_eordid
            EXCEPTIONS
              order_not_found   = 1
              lc_connect_failed = 2
              no_elements       = 3
              OTHERS            = 4.
          IF sy-subrc = 0.
            APPEND lv_eordid TO lt_ordid.
            CALL FUNCTION '/SAPAPO/DM_PO_READ'
              EXPORTING
                iv_simsession     = gv_sims
                is_gen_params     = gv_params
                it_ordid          = lt_ordid
              IMPORTING
                et_schedule       = p_lt_sched
              EXCEPTIONS
                lc_connect_failed = 1
                lc_com_error      = 2
                lc_appl_error     = 3
                OTHERS            = 4.
          ENDIF.
        ENDIF.
      ENDIF.
    Use '/SAPAPO/CMDS_SNP_MM_ORD_MODIFY' function module to change the schedule lines (Pass '16' to iv_order_type parameter).
    Let me know if u have any issues.
    Regards,
    Siva.

  • Function module to read 'Customer Material InfoRecords'?

    Is there a function module to read customer material inforecords?
    Transaction code VD53 is the display screen for Customer Material INforecords. I have a requirement to read this data in user exit.
    Thanks
    Gova

    I found one FM. RV_CUSTOMER_MATERIAL_READ
    But it won't serve my purpose as I need to find customer material number for a given material number.
    But, I found the table where this information is stored. KNMT. I'm going to create a custom FM to serve my purpose.

  • Bapi to read production order network

    Hi all
    I am searching a bapi to read entire network of a production order. I tried searching on forum but did not find anything.
    Can anybody help me please?
    regards
    Gabriele

    Hi Montoro,
    You can use FM      BAPI_PRODORD_COMPLETE_TECH       to read production order network..
    Thanks,
    Ravi

  • Reading Custom IDOC from xMII

    Hi all,
    I'm trying to read a custom IDOC coming from ECC system, with no result. I'm able to read standard IDOC but it seems there are some kind of limitations reading custom IDOC.
    IDOC on the ECC side are setted up in the same way, but when I send the IDOC in a Z transaction from ECC the IDOC is not visibile both in the xMII Message Monitor and in the xMII Messages Without Rules.
    Do you have any idea?
    Thanks.
    Regards,
    Roberto

    Roberto,
    This has come up several times in the last year or so.  So far in my memory, that problem always turned out to be some configuration setting with the custom IDoc.  Do a search on IDoc or custom going back a year (maybe more) to see the issue others found when experiencing problems with custom IDocs. 
    Regards,
    Mike

  • Read Custom format of Excel

    I want to read custom date format from excel through JAVA:
    Issue:
    In my excel cell is of custom format MMYYYY. Which is 011900.
    When i click on it It shows me 1/0/1900. I am using jxl.jar for reading excel.
    When i am reading it through java it is not taking date as 0. So it is gicing me value 121899. Dont Know why??? Could you please help me. Its very critical to my project.
    Thanks in adance.

    There could be weird Excel stuff happening, or weird JXL stuff, but basically here's what is happening:
    You have Day 0 of Month 1 of 1900. This is treated as the day before Day 1 of Month 1 of 1900, which if you get out your calendar you will see is actually Day 31 of Month 12 of 1899. And if you look at that with a format which displays only the month and year, you'll see 12 as the month and 1899 as the year.
    So: don't treat something with only month and year as a Date, unless you're prepared to fill in the day part properly.

  • Standard program / bdc / bapi to upload customer data.

    hi experts,
        i need standard program/bdc/lsmw/bapi to upload customer  amster data .

    Hi,
    Please check this links on how to use direct input program RFBIDE00.
    http://www.sapbrain.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html
    http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
    Regards,
    Ferry Lianto

  • BAPI for read FI documents in material document

    Hi all,
    with transaction ME23N i can display Material Document and in the tab 'Doc. info' i can display FI Documents if i click on the button. I'm looking for a BAPI to read this FI documents from the material document.
    Thanks for your help.
    Cheers

    If you mean that you need to know what BAPI's a particular transaction uses, which I can only assume that's what you mean, then you should access the code behind the transaction and search for 'CALL'. That normally is the standard method that think that most people use. 
    Suppose you want to find the bapi for creating a sales order, you usually use transaction VA01 for this. 
    1. Find out the package of the transaction. 
    Start Va01 go to system --> status. 
    Double click on transaction 
    Package is VA 
    Open this package in SE80 
    Open business engineering-->Business object types 
    Find the BO which sounds the most appropriate 
    I would suggest BUS2032 Sales Order 
    Double click. 
    Open methods. 
    Find the released method with from data or something similar in the name 
    , Createfromdat2 
    Position the cursor in it and click the program button 
    Scroll down to find the bapi used in this method 
    With this way you can also find out programs and FM's 
    2. Start va01 go to system-->status 
    Double click transaction VA01 
    Double click on package 
    Read the application component. (this is SD-SLS Sales) 
    Then open the transaction BAPI 
    Sales and distribution>Sales>sales order 
    createfromdat2

  • Reading custom OID Attributes

    We have a dev and a test portal server, and we have been successfully using the following code to read custom OID atributes. ie We have created our own LDAP schema/class with some of our own attributes. Then doing the following:
         PortletRenderRequest pReq = (PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
         String flag = pReq.getUser().getPropertyValue("myflag");
    This is working quite fine in our dev server, but does not work in our test server. The "flag" variable comes out as null in the test environment.
    As far as I can tell everything is configured and setup exactly the same. As this is someone else's code that I am maintaining I am not quite sure where to start looking. Can someone point me in the right direction on where to look to work out how this "getPropertyValue" is supposed to work?

    Hello Amarys,
    - In order to add Custom Attributes to Portal Database (default Java), you dont have to do attribute mapping in the XML. It is applicable for LDAP scenarios only.
    - You need to define Administrator / Self Managed Custom Attributes based on who views / modifies [UME Custom Attributes|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/44/0316d50bbe025ce10000000a1553f7/frameset.htm]
    - You can use the UME API to read the custom attribute value set during the registration process  -
    static final String CUSTOMER_NAMESPACE = "com.customer.usermanagement";
    IUser user = . . .;
    String org[] = user.getAttribute(CUSTOMER_NAMESPACE,"hr_org");
    if (org != null) {
    for (int i=0; i< org.length(); i++) {
    response.write("Org: " + i + " = " + org<i>);
    } else {
    response.write("No orgs found for this user.");
    -  Extremely good reference (make sure you dont use any depricated API) -
    [UME API|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3641e490-0201-0010-c68f-e51221925714?QuickLink=events&overridelayout=true]
    Hope this helps ! ~ Dhanz

Maybe you are looking for

  • Change the status of a Support Desk Message in Sol. Man.

    Hello, On the Solution manager system I have configured the service desk functionality. So end users are able to create support messages from the satellite systems as well on the solution manager system. For the confirmation of a proposed solution I

  • Need help with a copy of an old document Using Adobe PSE 8.0

    I have a copy of a document (Will) written in ink, in 1782.  The problem is, about half of the ink has faded over time, so that only the bottom portion of the Will is still readable.  I wish to be able to alter the image so that somehow someway I wil

  • Transfer Speed

    Is there any way I can speed up the transfer rate between my iTunes and my iPod? Its awefully slow, and I have school tomorrow. Thanks. 8) -Pete

  • Exporting 16:9 and retaining aspect ratio

    Hi all. I have a 16:9 Pal project and want to export it for iPod (I have checked the iPod forum to no avail). When I export the project the picture is squished and is 4:3. I have tried many things but cannot get the desired result - a wide screen iPo

  • How to delete a iMovie Project

    Hi everyone how do you go about deleting a iMovie project that you started but dont want to use. I want to get rid of it completely and recover the HD space it used up. Thnx in advance