Fetchi address1, address2,address3 and address4 of a ship to party customer

Hi,
How to fetch address1, address2,address3 and address4 of a ship to party customer. Is there any function module available?
Thanks,
Kumar

Kumar,
you can use BAPI_CUSTOMER_GETDETAIL2
either:
* Read a person address:
  DATA: objtype LIKE bapi4002_1-objtype,
        obj_id LIKE bapi4002_1-objkey,
        obj_id_ext LIKE bapi4002_1-extension,
        context LIKE bapi4002_1-context,
        address_number LIKE adrc-addrnumber,
        person_number LIKE adrp-persnumber,
        bapiad2vl LIKE bapiad2vl OCCURS 0,
        bapiadtel LIKE bapiadtel OCCURS 0,
        bapiadfax LIKE bapiadfax OCCURS 0,
        bapicomrem LIKE bapicomrem OCCURS 0,
        return LIKE bapiret2 OCCURS 0.
* Assign the following object type and key to the private address of a
* customer contact person
  objtype    = 'BUS1006001'
  obj_id     = <partner number (KNVK)>
  obj_id_ext = ' '
  context    = '0004'
* call GetDetail module
  CALL FUNCTION 'BAPI_ADDRESSPERS_GETDETAIL'
     EXPORTING
          obj_type      = objtype
          obj_id        = obj_id
          obj_id_ext    = obj_id_ext
          context       = context
     IMPORTING
         address_number = address_number
         person_number  = person_number
     TABLES
         bapiad2vl      = bapiad2vl
         bapiadtel      = bapiadtel
         bapicomrem     = bapicomrem
         return         = return.
Edited by: Amit Gujargoud on Jul 2, 2008 3:38 PM

Similar Messages

  • Fetch Sales order number and PO number from ship to party and sold to party

    HI,
    I need to get Sales order number and PO number
    from ship to party and sold to party.
    I have only ______sold to party and ship to party and req del date_______ in selection screen as mandatory
    Please let me know
    Sreekanth

    Hi,
    You can do this:-
    SELECT VBELN FROM LIKP
    INTO TABLE T_DELIVERIES
    WHERE KUNNR = SHIP TO PARTY
    AND     KUNAG = SOLD TO PARTY
    AND LFDAT      = DEL DATE.
    You will get a table containing the list of deliveries.
    Use VBFA to get the sales orders from deliveries.
    SELECT VBELV FROM VBFA
    INTO TABLE T_SALESORDERS
    WHERE VBTYP_N = 'J'
    AND     VBELN  = T_DELIVERIES-VBELN.
    T_SALESORDERS WILL give you list of sales orders.
    From Sales Orders you can get Purchase orders through EKKN Table.
    Using EKKN pass T_SALESORDERS-VBELN and get corresponding EBELN.
    Regards,
    SUbhashini

  • 1 Sold to Party and N no. of Ship to Party "s?

    Heloo ,
    My Scenerio is like this follows - Please Provide me the solutions .
    Spencers Head Officer Order to me for 100 Quality of Articles and it directs 10 Branch (Outlets) to deliver .
    1.But now my Question is how to map 10 different Ship to parties in 1 Sales order and Customer Creation . But my BP & PY will be Spenscers Head Office.
    2. Say for example if i create 10 Branches (outlets ) in the Account Group of SH , How and where to Assign to Sold party ?
    Do the needful. Thank you.
    Regards,
    Amrita

    Hello,
    Create Spencers as the sold-to-party SP, then create 10 different ship-to-parties with the respective addresses, you may maintin all these in XD02 --> Give the sold-to-party number --> Sales area data tab --> Partners , by default the ship-to-party partner would have picked up with same number as the sold-to-party. Remove that and add all the 10 ship-to-parties with function SH.
    If you want to put this only in the sales order, you may do the same in Order--> Header --> Partners, here you may add all the ship-to-parties, this will be applicable to this sales cycle only.
    Prase

  • Create Ship to Party and Sold to Party for distr. channel 10 in VA01

    Hello all:
    When creating sales order for a material in VA01 with sales Org 1000,
    distribution channel 10, division 00, system does not give me any Ship to Party and Sold to Party with the above combination
    How to create ship to party and sold to party with the above combination (Plant 1000,
    sales org 1000, distribution channel 10, for creation of a sales order
    Ironically, when creating material master for a material with a material type KMAT, plant 1000
    sales org 1000, the only distribution channel is populating in the input help (F4) is 10
    For which no ship to party neither sold to party is maintained in sales order creation
    Thanks in Advance!!

    Hello Csaba:
    Thanks for your reply
    I agree that for a combination of sales order, dc and division one can have
    many customers. But the customer master data of sold to party in linked to the sales order,
    dc and division
    When sold to party is entered the system will copy the sales order, dc and division
    which is maintaiined in the customer master data
    Sold to party details and the material for which sales order is being created needs to
    be matched in terms of sales org, dc and division then system will process the sales order
    In my current client, there is NO SHIP TO PARTY customer master data maintained
    with a combination of sales order 1000, dc 01, division 00, thus it do not process
    further as material for which sales order is being created has the above combination
    Due points have been assigned

  • Function module to find both sold and ship to party

    Is there any function module to find both sold-to-party and ship-to-party based on the sales Area.
    That is if i give sales org , distribution channel , division as input . I must get Sold-to-party and Ship-to-party as output.
    Regards,
    S.Velsankar

    Hi,
    You can find sold to and ship to party customer from KNVP Table as below:-
    SELECT      KUNNR
    FROM KNVP
    INTO w_sold_to_party
    WHERE VKORG = YOUR SALES ORG
    AND     VTWEG = dist channel
    AND    SPART = division
    AND    PARVW = 'SP'.                        "Sold to party depneds of how its configured in your system
    Check TPAR table for description Sold to part and pass the PARVW value.
    Similarly for ship to party
    SELECT      KUNNR
    FROM KNVP
    INTO w_sold_to_party
    WHERE VKORG = YOUR SALES ORG
    AND     VTWEG = dist channel
    AND    SPART = division
    AND    PARVW = 'SH'.                        "Sold to party depneds of how its configured in your system
    Regards,
    Subhashini

  • One Sold to party and 250 ship to party (MTO Process)

    Dear Experts,
    Please provide me the solution with your valuable experience.
    Issue is: We are working on MTO process. and I am working in SD on sales order.
    issue is here that I have one SP(Sold to party) and many ship to party. I have created 250 Ship to party under one Sold to party in XD02 partner function . But now what we want that, we want to make single sales order and want to distribute same Finish Good to different parties.
    Example: Making SO: 1000 with one SP and One SH and Finish Good is FG0001(Same Finish Good we want to distribute into different parties). Finish Good comes Bit n pieces and when we do availability  check then it is done with wherever amount of Finish Good we got. First time it is ok and send to one ship to party with delivery now again we got some Finish Good and doing availability check but this time again the ship to party is same but we want to change it for different ship to party with in single Sales order.
    Please provide me the solution for this how we can proceed with single sales order.
    Thanks for your time.
    Smith

    Thanks Ragu,
    Issue is
    One Sales Order(MTO) suppose quantity is 100 and now I am doing delivery 20 with 5 items each from sales order item level(Changing SH every time at item level with WRT quantity acc to SH, delivery is coming fine.) Now We have to apply postal charges on each delivery.
    Postal charges depends on weight and the distance of items that are packed in case or in Boxes.
    Example: First delivery is of 5 items and the weight of 5 item is 100kg after packing now delivery guys tell the charges wrt to distance, if they are sending via Speed post then cost will be 100*5 (1km per 1RS so if distance is 5km then charges will be 5rs)=500rs
    Now this 500rs we want to add in our billing per bill or collective also like total = price +500 should come.
    Please suggest me how should i configure this step by step.
    Thanks
    Smith

  • Need to pick Bill to party and Payer from Ship to party instead of Sold to

    Hi,
    Please let me know the configuration setting needs to be done for capturing the Bill to party and Payer from the Ship to party instead of the Sold to party. This requirement needs to apply to curtain document types only.
    Please respond as soon as possible.
    My mail ID: [email protected]

    Hello,
    you can change your customizing settings in the transaction VOPAN  and put there that the Bill-to and payer should be determined from the ship-to party ( in special partner determination procedure). Than assign this partner procedure to your spacial sales order types.
    Best regards,
    Lela

  • Seeking to fetch thcorrect  sales text and comment for a material number

    Ladys and Gents,
    Currently I have the problem to fetch correct sales text and comment text on the data base for a certain material.
    For this purpose I’ll  can use the CALL FUNCTION 'READ_TEXT' as bellow which works quite good. I just have to call it two time, once for the sales text and next time to fetch the comment text. But first I need to know for which languages a sales text is maintained before I call this function and give the language as an input like ‘E’. I would be very thankful for any comments.
    /Kam
    PS:
    CALL FUNCTION 'READ_TEXT'
          EXPORTING
            ID                                                   = '0001'
            LANGUAGE                                    = 'E'
            NAME                                            = l_tdname          “that contains mat.Number
            OBJECT                                         = 'MVKE'
          TABLES
            LINES                                            = i_sales_text       “contains the return text
          EXCEPTIONS
            ID                                                  = 1
            LANGUAGE                                   = 2
            NAME                                            = 3
            NOT_FOUND                                  = 4
            OBJECT                                         = 5
            REFERENCE_CHECK                     = 6
            WRONG_ACCESS_TO_ARCHIVE    = 7
            OTHERS                                         = 8.

    hi check this...
    http://help.sap.com/saphelp_nw04/helpdata/en/e0/7846ec17e111d2b429006094b944c8/frameset.htm
    regards,
    venkat

  • How to fetch data from XML and store it in internal table

    Hi All,
    Can anyone help me out, in fetching data from xml and store it in an internal table. Is there any standard function module is there?
    Regards,
    Karthick

    to do this you can either develop a XSLT program and use it with CALL TRNSFORMATION key word to tranform the XML into itab .
    (search the ABAP General forum, i have posted few samples)
    or simply use the following FM which converts your XML into a itab of name value pair (name would holw the element name and value would hold the value of the element) which you can then loop and read it to your itb.
    data:             xmldata type xstring .
    data: result_xml type standard table of smum_xmltb .
    data: return type standard table of bapiret2 .
    CALL FUNCTION 'SMUM_XML_PARSE'
      EXPORTING
        xml_input       = xmldata
      TABLES
        xml_table       = result_xml
        return          = return .
    Regards
    Raja

  • Fetching record from table and displaying in JSP while loading page -struts

    Hi all,
    I have a problem relating to struts .
    I am fetching records from database and I want to diaplay those records in corresponding fields in the jsp page.
    I am using Struts MVC Framework.
    I am giving the sample code below.
    In my action class i am giving the following code.
    String sql="Select empname from emp where empcode='1' ";
    ResultSet rs=S.executeQuery(sql);
    if(rs.next()){
    EditForm e=new EditForm();
    e.setEmpname(rs.getString(1));
    In my Action Form
    I gave setter and getter methods for Empname
    public String getEmpname() {
    return empname;
    public void setEmpname(String empname) {
    this.empname = empname;
    In my jsp gave
    <html:form method="POST" action="submitForm.do?action=1" >
    <html:text property="empname" />
    </html:form>
    The targets given are correct and it is being redirected.
    But the value is not displaying in the textbox while the jsp is loading.
    There is a record for the sql query.
    Anybody please help me out
    It is very urgent
    Thank You
    Parvathy

    Now in the following code, why are u creating a new form?
    Why dont you use the form which is input to the Action Class's execute methof?
    if(rs.next()){
    EditForm e=new EditForm();
    e.setEmpname(rs.getString(1));
    }Thanks and regards,
    Pazhanikanthan. P

  • Dynamically fetch data from database and display it in the report

    Hi,
    We have a requirement in developing a report which needs us to dynamically fetch data from the database and display it in the report.
    We have a column called WORKER in the report.
    For each worker there is a measure(PSA) associated with it.
    In the report we have to display both the WORKER and the PSA column.
    What we want is, when we display the list of the workers, the corresponding workerid_id of the worker will be passed and the value of his PSA will be fetched from the database and displayed in the report.
    Or anything similar to this.
    We also have drill applied on this WORKER column. So after any drill up or drill down also the value for PSA should change.
    Is there any way of doing this?
    Please help if possible.
    Thanks,

    hi,
    data : count type i value 0.
    data : Begin of itab occurs 0 ,
    plan_version like hrhap-plan_version,
    APPRAISAL_ID like hrhap-APPRAISAL_ID,
    AP_START_DATE like hrhap-AP_START_DATE,
    AP_END_DATE like hrhap-AP_END_DATE,
    AP_STATUS like hrhap-AP_STATUS,
    AP_STATUS_SUB like hrhap-AP_STATUS_SUB,
    OBJ_DATE_SET like hrhap-OBJ_DATE_SET,
    REVIEW_DATE_SET like hrhap-REVIEW_DATE_SET,
    AP_DATE_SET like hrhap-AP_DATE_SET,
    AP_DATE_EARLIEST like hrhap-AP_DATE_EARLIEST,
    AP_DATE_LATEST like hrhap-AP_DATE_LATEST,
    CHANGE_DATE like hrhap-CHANGE_DATE,
    CHANGE_TIME like hrhap-CHANGE_TIME,
    CHANGE_USER like hrhap-CHANGE_USER,
    end of itab.
    <b>select * from hrhap into corresponding fields of table itab.</b>
    loop at itab.
    write :/ itab-plan_version under 'plan_version',
    itab-appraisal_id under 'Appraisal Id',
    itab-AP_START_DATE under 'Start Date',
    itab-AP_END_DATE under 'End date',
    itab-AP_STATUS under 'Status',
    itab-AP_STATUS_SUB under 'Substatus',
    itab-OBJ_DATE_SET under 'Objective setting date',
    itab-REVIEW_DATE_SET under 'Review date set',
    itab-AP_DATE_SET under 'appraisal date',
    itab-AP_DATE_EARLIEST under 'Earliest appraisal date',
    itab-AP_DATE_LATEST under 'Latest Appraisal date',
    itab-CHANGE_DATE under 'Change Date',
    itab-CHANGE_TIME under 'change time',
    itab-CHANGE_user under 'change user'.
    count = count + 1.
    endloop.
    write : 'No of records' ,count.
    rgds
    anver
    if hlped mark points.

  • My mother got an iPad air after she thought her old iPad was locked up with voice over anyway it says to hook to itunes i told it to fetch from the iCloud and it wont hook up to iTunes can someone help?

    my mother got an iPad air after she thought her old iPad was locked up with voice over anyway it says to hook to itunes i told it to fetch from the iCloud and it wont hook up to iTunes can someone help?

    Punctuation would make your post a little easier to read and understand.
    What do you mean it won't hook up to iTunes? you mean iTunes does not recognize the device? If that's what you mean, one of these might be helpful.
    iOS: Device not recognized in iTunes for Windows
    iOS: Device not recognized in iTunes for Mac OS X

  • Ship to party and Delivery address Different?

    The requirement is that the Ship to party address be different than the delivery address.
    Options i have thought about is
    1) Maintain the ref address in TEXT.
    2) Maintain a separate partner function.
    Please give suggestions as to how can we maintain 2 different addresses for the same ship to party?
    The user wants to have both addresses on the document.
    The TEXT option is not acceptable by the user.
    Please help.
    Thanks in advance. Point will be awarded for any helpful answer!
    Regards,
    Shrads

    This kind of requirement is very common in Consumer goods industries. I have worked on similar kind of requirement and we have mapped it in sap as below.
    1.Create customer master record with a new account group for the delivery address with parnter funciton as SF(Ship For)
    2.Assign this SF record in SH master record or SP record
    2.In sales document parnter determination proceudre include the parnter function SF by fetching it either from ship to master recrod or sold to
    Please let me know if you need any further details.
    Thanks,
    Srini

  • How to fetch the VAT registration number of the ship to party from billing

    Dear SDN Team
    How to fetch the VAT registration number of the ship to party from the billing document.  Can you proide some information for fetching the VAT registration number of the ship to party.
    Normally only the payer VAT registration number will be displayed in the Invoice.  But in my case the Ship to party VAT number is displayed. 
    I have resolved this problem by doing the customizing setting in order to have the payer vat registration number.  But for the Old Billing documents it is more than 30,000 documents where it was printed with the ship to party VAT number.  So i need to identify those documents.
    Can you please help to resolve this problem.
    With Regards,
    Jai

    Hi,
    To get VAT from the ship to from Billing, You have to first fetch the BILLING NUMBER from the VBRK and then goto the Document flow in VBFA to get the SALES DOCUMENT NUMBER and with sales document you will get the SHIP TO number from the VBPA with the PARVW = SH
    Once you got the SHIP TO , then goto the KNA1 and get the VAT ID in the field STCEG
    so the logic will be as follows
    VBRK---VBELN and then
    VBFA--VBELN with the document Category as C
    VBPA-VBELN and get the  KUNNR with PARVW =SH
    Now with KUNNR ( ship to ) get the VAT ID from KNA1-STCEG
    regards,
    santosh

  • Ship to party and vendor relation in third party process

    Hello Experts,
    I need your precious suggestions on my business requirement.
    When we create the third party sales order system creates the Purchase Requisition and further PO is created through purchasing department.
    Suppose in my third party sales order I have two items X & Y, and both need to deliver at two different ship to party XXX & YYY respectively. in order system determine plant 1000 for both materials based on plant determination (CMIR >> CMR >> MMR) and system generates PR.
    I know while converting the PR to PO system check Source list (ME01) to determine the vendor. my requirement is I want to determine Vendor based on ship to party in sales order. suppose ship to party locations for XXX and YYY are Bangalore and Pune respectively and in both place we have different vendor. Both vendor manufacture product X & Y. so I want system should pick the vendor according to ship to party.
    Is there any relation between ship to party and vendor which will work in third party processing ?
    Kindly explain how I can achieve this requirement.
    Thanks,

    I doubt this can't be achieved by SAP standard functionality. You may need to use user exit. Check Third party to purchase req user exit or purchase req user exit to fulfill the requirement.
    Regards,

Maybe you are looking for