Company code and  Ship-To Party: variable values should be dynamic

Hi,
We have queries where we have  Company code & Ship-To Party as Variable parameters.
While executing the report the user has to give the Variable values for both company code and ship to party.
But when they give the company code.....in the next parameter ship to party, it has to offer values which belongs to that company code only. But here it is offering all values form ship to party., where user don't want to see the value from other company code as they have lot of values there which is causing inconvenience to the user.
Kindly suggest me how to restrict the values at variable level.
Thanks & Regards,
Anand

Hi,
You can do that using BADI BW_BADI_F4 .
You can use this BAdI to restrict input help for entry variables in the BI variable screen.
Create a separate implementation for each required InfoObject.
The BAdI is designed for multiple use.
Restricting input help without using hierarchies
To restrict input help for flat object lists without using hierarchies, use method Get_Restriction_Flat.
Method GET_RESTRICTION_FLAT
I_VNAM Variable
I_IOBJNM InfoObject
I_T_VAR_RANGE Table of entries on the variable screen
I_T_COMPID Table of participating queries
C_T_RANGE Range table with other restrictions
C_INFOPROV InfoProvider
C_F4_Mode F4 mode
Entry parameters I_VNAM and I_IOBJNM return the names of the variables and the InfoObject that F4 helpwill be affected for. I_T_VAR_RANGE returns additional values from the variable screen entered beforethe call. These are returned in a range table that does not, however, return any information about variables that cannot be entered. I_T_COMPID is a list of participating BI queries.
If there is a single InfoProvider, entry and return parameter C_INFOPROV contains the InfoProvider forthe participating queries, and can be overwritten in the implementation. Especially when you have justone MultiProvider, this allows you to restrict the input help to one of the physical InfoProviders ifyou also set the F4 mode to u201CDu201D (input help from dimension tables). The mode can onlybe set to u201CDu201D in conjunction with physical InfoProviders, as dimension values are otherwisenot available. If you reference to a VirtualProvider that is based on a data transfer process, you always need to set mode u201CMu201D (input help from master data)
Return table C_T_RANGE is a range table of additional restrictions that can be used in the implementation.These restrictions are identical to restrictions that the system makes in the standard setting. It is therefore not possible to add to the list.
The following restrictions are permitted in C_T_RANGE:
u2022Restrictions for InfoObject I_IOBJNM itself (for example using a specified range)
u2022Restrictions to groups of InfoObjects (for example restriction of the fiscal year variant for fiscal years)
u2022Restrictions by the InfoObjectu2019s navigation attributes.
For technical reasons, pure display attributes cannot be used.
You can also make a restriction to physical InfoProviders. In this case, the input help is restrictedto the specified physical InfoProviders. Field IOBJNM in table C_T_RANGE then has to be set to 0INFOPROV.In the case of a MultiProvider using physical InfoProviders with mode u201CDu201D (input help from dimension tables), the input help is built from all participating physical InfoProviders.
Entry and return parameter C_F4_MODE describes the retrieval method for the F4 help:
u2022In mode u201CMu201D, the input help is built from the master data.
u2022In mode u201CDu201D, the input help is built from the dimension tables of physical InfoProviders.
The choice of method is therefore always dependent on the choice of InfoProvider.
Restricting input help using hierarchies
To restrict input help for flat object lists using hierarchies, use method Get_Restriction_Node.
Method GET_RESTRICTION_NODE
I_VNAM Variable
I_IOBJNM InfoObject
I_T_VAR_RANGAE Table of entries on the variable screen
I_T_COMPID Table of participating queries
C_T_HIERARCHY Table of possible hierarchies
C_T_NODE Table with node restrictions
C_INFOPROV InfoProvider
C_F4_Mode F4 mode
On the whole, this method is the same as method GET_RESTRICTION_FLAT. Instead of a C_T_RANGE, the additional node restrictions can be submitted using table C_T_NODE.
C_T_HIERARCHY contains the hierarchies that can be used based on the existing query restrictions. Ifthis table contains multiple entries, the system uses the first hierarchy in the standard setting. In a BAdI implementation, specific entries can be removed in order to select the required hierarchy.
Table C_T_NODE can be filled with individual nodes in order to restrict the hierarchy to the corresponding subtrees.
All other parameters are the same for Get_Restriction_Node as described above for method Get_Restriction_Flat.
For more information about implementing BAdIs for the enhancement concept, see the SAP Library for SAP NetWeaver, under BAdIs u2013 Embedding in the Enhancement Framework..
Regards,
Durgesh.

Similar Messages

  • Can you  tell me  relationship between company code and shipping document

    how to make the relationship between shipping document with company code .
    i have selection criteria which having company code and shipping no.
    but i am not able to make relationship, so please find and tell me the relationship table structure
    Regards,
    Siva

    Hi Siva,
    Read table TVKO to get the sales organizations (field VKORG) for the company code (BUKRS). This query might result into multiple VKORG entries.
    Read deliveries (LIKP) with VKORG as input to get all deliveries for the sales organziation.
    Regards,
    Frank Umans

  • Releation ship between the Company code and confirmation key in SPRO

    Where to find the releationship between the Company code and Confirmation key in SPRO

    Hi Kishore,
      There is no relationship between those two. If you want to set confirmation key, you can set in purchase order item details tab in confirmations tab. It will be useful to know the shipment of open items from customer like shipment notification, inbound delivery.
    Regards,
    Prasath

  • ORDERS 05 idoc sold to and ship to party?

    As far as i know the ORDERS 05 idoc is for sales order which we get from the customer who wants to but products from our company.
    In the idoc there is a segment E1EDKA1 contain sold to party and ship to party fields. What is the significance of these fields? What values are filled for these fields? Are these 2 fields also part of any other idoc?
    In real time from xi point of view from which system to which system this data will move?
    I have checked few documents on sold to and ship to party but ended up getting more confused.
    Please help me with the answers.
    Regards,
    Suresh.

    Hi Suresh,
    The Sold to and Ship to party details from posted IDOC type ORDERS 05  are not at all in relation with the data moving from XI to whcih are sender and receiver systems.
    You are right as the ORDERS 05 is used for Sales Order.
    While creating the sales order we need to specify the Sold to party and ship to party information. this gives the information about the party against which you have generated the sales order and the the ship to party will indicate the location specific branch of the customer party.
    For.eg. the customer will be requesting for the sales order and he wish to deliver the order at his particular branch then Sold to party--Customer No and Ship to party i.e. Location specific details are required.
    Thanks
    Swarup

  • Company code and Purchase Org during vendor registration

    Hi,
    I have one enterprise context, with many company codes and purchasing org.
    I am aware that vendor master data is at enterprise level in ESO. However while integrating to backend i need to capture the relevant co code and Purchasing org.
    When the Purchaser wants to create a vendor, there does not seem anyway to enter which Purchasing org and company code the vendor should be created for.
    Need your suggestions for the following options
    1) capture co code and Purchasing org on bespoke fields and then in PI, pass these values to Co code and Purch org resp
    2) create company contexts - would this resolve this? what are the implications if one vendor needs to be extended to multiple co codes
    regards
    Subrote

    Hi,
    Have you imported integration config workbook.
    As part of ECC integartion  guide we have couple of workbook and XML needs to integrated, which will create all the required extension for vendor master and vendor registration.
    Once you imported the integration workbook, you will able to see the company code and purchasing org screens in vendor master.
    Thank you,
    Mani

  • Sold to party and Ship to party are the same but has different address

    Hi,
    I have problem here wherein Sales order has the same sold to party and ship to party but they have different address. When the customer master data is changed the sold to party in the sales order is also updated but the ship to party is not updated.
    I've checked the table VBPA and I noticed that the value of ship to party VBPA-ADRDA is 'E' (manually enetered).
    Is this the reason why the address of ship to party in sales order is not updated whenever the customer master is change?
    Another question, how does ship to party entered in sales order manually?
    Thanks in advance.

    Hi,
    Please correct me if I have understood the scenario incorrectly which I try to explain below:
    Sales order is created where SP and SH both have same address initially and while creating the SO, address of the SH was changed manually by Header>partners>SH
    Now master data for that customer is changed for address. As per the standard functionality of SAP, all sales order created for that customer will have new address for SP only.
    If address of SH needs to be changed in SO, it has to be done manually by the same way as explained in the above mails.
    As far as manually entering the SH in SO is concerned, system will automatcally selects the SH if only one record is available for SH. If you have specified more than one SH, system will give you an option to select one by displaying a pop up.
    Please let me know if you find this explanation suitable.
    Ravi

  • Determine company code and location (plant) w.r.t., cost center

    Hi,
    How could i determine company code and location based on given cost center. Could anybody please let me know if any table or function module is available to get this.
    Thank you

    Hi,
    As mentioned above im using META_READ_TABLE FM to get company codes from CSKS table of ECC. Below is the code im using:
       DATA:i_opt type STANDARD TABLE OF RFC_DB_OPT, i_fld type STANDARD TABLE OF RFC_DB_FLD,
           i_res type STANDARD TABLE OF TAB512.
    Constants:   c_expr(72) TYPE c VALUE 'KOSTL EQ COST_CTR', c_fld(5) TYPE c VALUE 'BUKRS'.
      w_opt-text = c_expr.
    w_fld-FIELDNAME = c_fld.
    append: w_opt to i_opt,
            w_fld to i_fld.
    data i_control type STANDARD TABLE OF BBP_CONTROL_RECORD.
    **&&--Get Co code from ECC (CSKS table)
    CALL FUNCTION 'META_READ_TABLE'
      EXPORTING
        QUERY_TABLE          = c_table
    *   DELIMITER            = ' '
    *   NO_DATA              = ' '
    *   ROWSKIPS             = '0'
    *   ROWCOUNT             = '0'
        LOGICAL_SYSTEM       = v1_logsys
      TABLES
        OPTIONS              = i_opt
        FIELDS               = i_fld
        DATA                 = i_res
        CONTROL_RECORD       = i_control.
    however it is giving me 'Communication Error' while executing this piece of code. I guess the problem here is with table i_opt which is holding logical expression. while calling this fm system is not recognizing logical expression 'KOSTL EQ COST_CTR'. Could anybody has any suggestion for this. please advise.
    Rgds

  • 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

  • How to calculate no.of records for a specific company Code and Transaction

    Hi All,
    Could you please help me how to calculate or count no.of records, in a table which are having a specific Company Code and Transaction Code and populate  in an output table displaying that these many records are present for this company code and Transaction code.
    The table is having the data like this:
    LOB   TRAN CODE    COUNT
    X1                             1   
    X1                              2   
    X1                              3   
    X1                              4   
    F1   NB                      5   
    F1   NB                     6   
    F1   NB                     7   
    F1   NB                    8   
    F1   NB                    9   
    F1   NB                    10  
    F1   NB                    11  
    F1   NB                    12  
    F1   NB                     13  
    F1   NB                     14  
    F1   NB                     15  
    F1   NB                     16  
    F1   NB                     17  
    F1   NB                     18
    F1   NB                    19  
    F1   NB                    20  
    F1   NB                   21  
    F1   NB                   22  
    F1   NB                   23  
    F1                          24  
    F1                         25  
    F1                         26  
    F1                         27  
        In the above table there are totally 27 records,where as the no.of records with F1 as company code and NB as transaction code are 18..so i have to display like F1 NB and 18 as one record as output.
    Thanks and Regards,
    Johny

    You can go for Control Breaks for your requirement.
    First sort the internal table by company code and transaction. Declare a counter variable.
    Now loop the internal table and increment the counter variable. within the loop use AT END OF tcode.......ENDAT. Within the control break append the counter variable as well as the company code and tcode to some other ITAB and clear the counter.
    This will give you the total number of records for a combination of co code and tcodes.
    This will be a good reference for your requirement. What I am doing here is, for each Vendor i am calculating total number of deliveries and amounts for that vendor. For every new vendor i am writing the ouput on to a list and clearing the counter variables.
      LOOP AT t_vend_prod_grp INTO fs_vend_prod_grp.
        w_total_delv = w_total_delv + 1.
        w_total_amt = w_total_amt + fs_vend_prod_grp-dmbtr.
        AT NEW matkl.
          w_mat_grp = fs_vend_prod_grp-matkl.
    * To display the material group and the header texts for the data
    * grouped by material group and vendor.
          SKIP 1.
          WRITE:  text-mtk  COLOR COL_HEADING
                                  INTENSIFIED,
                / w_mat_grp COLOR COL_NORMAL
                                  INTENSIFIED OFF.
          SKIP 1.
          FORMAT COLOR COL_HEADING ON INTENSIFIED.
          ULINE  1(54).
          WRITE:/ sy-vline,
                2 text-ven,
               12 sy-vline,
                  text-dlv,
               26 sy-vline,
               38 text-amt,
                  sy-vline,
               46 text-cur,
               54 sy-vline.
          ULINE /1(54).
          FORMAT COLOR COL_HEADING OFF INTENSIFIED.
        ENDAT.                             " AT NEW MATKL
        AT END OF lifnr.
    * To display the actual data for the grouping based on Material group
    * and Vendor.
          FORMAT COLOR COL_NORMAL ON INTENSIFIED OFF.
          WRITE: / sy-vline,
                 2 fs_vend_prod_grp-lifnr COLOR COL_KEY,
                12 sy-vline,
                   w_total_delv,
                26 sy-vline,
                   w_total_amt CURRENCY text-usd,
                   sy-vline,
                46 text-usd,
                54 sy-vline.
          FORMAT COLOR COL_NORMAL OFF INTENSIFIED OFF.
          CLEAR: w_total_amt,
                 w_total_delv.
        ENDAT.                             " AT END OF LIFNR
      ENDLOOP.                             " LOOP AT T_VEND_PROD_GRP

  • Enhancement for validating SOLD TO PARTY and SHIP TO PARTY

    Hi All,
    Have written in the form routine USEREXIT_CHECK_VBAK to validate the sold to party and ship to party, but whenever error is encounted the  input fields comes in display mode but i need that in change mode so that user can enter the input again.
           Quick response will be appriciated..
    Thanks & Regards,
    Parvez..

    Hi,
    Since the userexit code is not called within the CHAIN...ENDCHAIN or using the FIELD statement...
    When you get the error message the entire screen will be blocked..
    Try giving a warning message..
    THanks,
    Naren

  • Enabling sold to party and ship to party on Sale order creation....

    Friends,
    When i start creating a sale order,
    1 .Iin Sale order screen the sold to party and ship to party are in the disable mode, i could not able to enter any value...how to make it to enable...
    2. but  allowing  me to enter the item and qty, and after entering these value i tried to check for the pricing condition using the condition tab, but i could  not able to see any procedure or condition type...though i defined the pricing procedure(V/ov8) assinged through OVKK...
    Thanks
    Ramesh

    HI,
    Check the Following Configuration
    SPRO -->Sales & Distribution -- > Basic Function >Partner Determination>Set Up Partner Determination-->Set up Partner Determination for Sales Document Header
    Check and all Five Steps i think you didn't assign the Partner Determination Procedure to Sales Document type
    Assign TA to your Sales Document Type or if you create any own partner determination Procedure assign that to Sales Document type
    Check & Revert
    Regards,
    Prasanna
    Edited by: prasanna_sap on Sep 7, 2011 12:12 PM

  • Sold-to-party and Ship-to-party is disable

    Dear Expert,
    In SD IMG I assigned debit memo sales docs type into sales area to sales documents type.  Initial screen for VA01 it is okay. But showing in next screen sold-to-party and ship-to-party is disable. I can not select the customer.
    Please help me.
    Thanks & B.Rgds

    Hi Bishnu,
    1. Are you creating Debit memo or Debit memo request in VA01. I hope you are creating debit memo request.
    2. Do you have any of these order creation enabled through IDOCs.
    3. Do you use screen variants or transaction variants.
    If point2 is in process, then it is very much possible that SP/SH is always proposed from IDOC and not manually enterable.
    Even if 2 is not in process, it can be enabled by some user exit to make those fields as uneditable.
    This can be due to various reasons  like
    1. The DMR is to be created only with reference to an order and not without reference. If you create DMR with reference, these values come as automatically filled.
    2. The creation of DMR has to be made possible only by some selected group of individuals and you may not the right person to create a DMR.
    Please analyse the issue on all these fronts.You should be a ble to get the solution.
    You can reward if this approach helps you

  • How to process AT END OF command for company code and transaction number.

    Hi,
      I  have report with selection screen with company code and key date.  Based ON key date given I should calculate Accrued interest for all transaction with in each company code.
        When I run report with one company code it works fine. But when I run with multiple company codes the amounts are messed up.
    I am getting all company codes with transaction details in to ITAB1 like this below, and PERFORM get_processdata. has my calculation for interest rate.
      SORT itab1 BY company_code  transaction.
      LOOP AT itab1 INTO wa_tab1.
        itab2 = wa_tab1.
        APPEND itab2.
        AT END OF transaction.
           PERFORM get_processdata.
        ENDAT.
      ENDLOOP.
    Thank you.

    Hello,
    You need to use AT New event to clear your total variables.
    AT New - this will go for first time also but we want to clear variables from second time. it requires flag to stop going it first time
    Pseudo code:
    clear: flag.
    Loop at itab1 to itab2.
    At New.
    if flag eq c_x.
    clear: <total variables>, intenal tables.
    move c_x to flag.
    endif.
    tab2 = wa_tab1.
    APPEND itab2.
    AT END OF transaction.
    PERFORM get_processdata.
    ENDAT.
    ENDLOOP.

  • Tax Determination Bases on Bill to Party and Ship to Party

    Hi Guru ,
    I have a requirement Tax should be determined based on Bill to Party and Ship to Party.
    If Bill to and Ship to are  Overseas Customers then '0' TAX.
    For all remaining Customers 7 % Tax
    Could you please advice
    Thanks

    Hello,
    Define two  ACCESS SEQUENCE with the combination of Region code/Country key
    Define the two TAX  CONDITION types and assign the Access sequence one for each scenario
    In OVK1 assign the Country key and TAX CONDITION and in OVK3 assign the tax category as 0 for the Overseas customer and 1 for Domestic customer
    Then in VK11 maintain the condition records as 0% for Overseas customers and  7% for the Domestic customers.
    Regards,
    santosh

  • Upload address data and ship to party

    Hello Freindz
    I want to upload address data and ship to party for the customer.  How could I do these two task together.
    I have found BAPI to upload address data BAPI_BUPA_ADDRESS_ADD but I wish to upload both address data and ship to party data together.  Is there any function module available or what can be the way to do this.
    Regards
    Manisha.

    Hi Manisha
    Does the ship-to-party already exist in the system?
    Anyways, there is no function module which performs all tasks at once. So you'd have to make on, which is not really complicated (simplyfied code):
    FUNCTION add_address_and_ship_to.
      CALL FUNCTION 'BAPI_BUPA_ADDRESS_ADD'.
    if required...
      CALL FUNCTION 'BAPI_BUPA_CREATE_FROM_DATA'.
    and finally assign ship-to party
      CALL FUNCTION 'BAPI_BUPR_RELATIONSHIP_CREATE'.
    ENDFUNCTION.

Maybe you are looking for

  • IPhoto library upgrade failed, one third of the photos lost, but the library works as normal. No corruption.

    Hello! I recently replaced my tragically crashed Macbook Pro 2008 with a newer model and transferred my volumous iphoto library of 20 000+ photos to my new machine. To be able to use my iphoto '08 library with Aperture I had to upgrade the library in

  • Need help with Photoshop elements 11 download

    Just purchased a download card for Photoshop elements 11, created an account, registered the card, got a serial #. And now there is no download screen, or prompts to guide me to the next step of downloading the product. What is the issue and what sho

  • Skype problem HTC 8S WP8.1

    Hello guys... I have a problem with skype on my WP device i just updated my phone to wp 8.1 and i download skype... and after that i installed skype,and skype just crash a lot of times and i can't call anyone.I just wait and nothing is happening just

  • How to recover ZFS pool after re-installation of Solaris10

    I have two disks(c1t0d0-disk1, c1t1d0-disk2) and I installed Solaris 10(fresh installation) in a slice of disk1. On the other hand, I have ZFS filesystem in a slice of disk2. I would like to restore old ZFS filesystem in disk2. How do I recover old Z

  • Empty Movie Screen

    I installed the trial version of pro cc primers, project part, although I can put the file there is no image in the monitor source. [Please post in English.  Adobe does not currently offer a Turkish forum.] Message was edited by: Jim Simon