Searching for Sales Order for the given Customer PO Number Pattern in BAPI

Hi,
     I have developed a BAPI which retrieves all the Sales Orders for a given Customer (Sold-To). The Following are the Input Parameters given in the Function Module (RFC).
Customer Number (Mandatory)
From Date (Optional)
To Date (Optional)
Sales Order Number(Optional)
Customer PO Number(Optional)
Now, when the Customer PO Number is populated, it will come as a Pattern, say 9ab* and I need to retrieve all the Sales Orders with PO Number starting with 9ab.
When I am trying to retrieve, it is giving different set of output based on the Case specified in the Customer PO Number Pattern. Lets say, if I give 9ab, I get 200 Records but if I give 9AB, I get only 5 to 6 Records.
As I have understood from the Standard Transaction VA03, it has a Search Help VMVAA which retrieves all the Sales Orders for the given PO Number pattern irrespective of the Case, that is Lower Case, Upper Case or Mix of Upper and Lower Case.
I can see the Code in the Search Help Exit but couldn't find useful piece of code which I can implement in my BAPI to simulate the same.
Can somebody help me on this?
Thanks,
Venkat.

Hi Sudhir,
         I think you did not understand what my problem is. What I mean to say is, for Customer X, the PO Number could be 9abc and for Customer Y, the PO Number Could be 9ABC.
       So, according to your logic, if I translate it to Upper Case, it will give the Sales Order details of Customer Y to Customer X.
      And more over, SAP stores the PO Number as it is entered in the Sales Order Screen (VA01).
    What if the Customer PO Number for Customer X is 9aBcDeFgH? and the PO Number for Customer Y is 9AbCdEf?
   Hope you've understood my question.
Thanks,
Venkat.

Similar Messages

  • FM:create a delivery for sales order in the background.

    Hi experts
    I want  Function Module to create a delivery for sales order in the background for both inbound and outbound.
    tcode : VL10A.
    Thanks in advance.
    kiran j

    Hi Kiran,
    Welcome to SDN Forums
    Please use the correct or most appropriate forum.
    The ABAP Objects Forum should be used for: ABAP Object definition and implementation including encapsulation, interfaces and inheritance in ABAP Objects.
    This thread will be moved from to .
    The forum is dedicated to: Data Transfer Techniques, Batch Data Communication, Legacy System Migration Workbench, Application Link Enabling, IDOCs, BAPIs.
    Please see the [Forum Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting.
    Also read this thread Welcome and Rules of Engagement.
    Greetings,
    Marcelo Ramos

  • Report for Sales orders with the consumed credit limit value

    Dear Gurus,
    In my company, the credit check is at sales order level. We want a report which shows up the credit value consumed from the credit master by Sales order.
    Going into the details, Say Credit limt is setup for a customer at Credit master for 10000 $.
    I want a report showing Sales order 59235 has consumed 500 $, Sales order 59277 has consumed 1500 $, Sales order 59333 has consumed 2500 $.
    Is their a report in standard SAP for the above functionality. If not, any ideas of how to achieve it?
    Thank you for your responses.
    Regards,

    Hi,
    Try the following transaction codes
    S_ALR_87012218
    FDK43
    F.31
    But if you want to a report like what you explained in thread i think in standard not available we need to develop a customized one.
    Regards

  • User exit for Dlvy Block at header for sales order for Companycode & materl

    Hi all,
    I have a requirement. I need to apply a Delivery Block for all sales orders which fall
    In a particualr company code "999" and if they have any configurable material in the item level.
    When a Sales Order is generated, during the process of generation, I should
    Write a loigc such that, if the sales orders fall in a particlar company code
    Say for '999' and if they have a configurable material at item level,
    I have to trigger an ABAP Proxy that goes and fetches a Yes/No value from an
    External system. Based on this Flag value I h ave to then apply a delivery block for
    The order at header level.
    So I assume, I should put a logic in some user exit that gets triggered before order is saved.
    And in that user exit I have to check if the Company Code of that order is '999' and if it  has
    Configurable product or not. If it satisfies the 2 conditions, I should, trigger this ABAP Proxy and
    Based on the true/False value I have to set Delivery Block or do not set delivery block for the order
    At header level.
    So I think first I should figure  out following things.
    1) user exit ..where I should put the code to check conditions and to apply delivery block.
    2) write a proxy and trigger that proxy in this user exit.
    Coming to first part, which user exit should I use to set delivery block for the order
    At header level. And how will I check for company code and config product?
    Which variables of the SAP stnd pgm store Company Code and Config product values so that
    I can check those variables for that values?
    Please suggest and help me with this.
    Any help will be highly appreciated.
    Regards,
    Sam

    1)go to the main program sapmv45a
    include MV45AFZZ ->userexit_move_field_to_vbak
    depending on ur conditions ...
    keep a break-point in the form userexit_move_field_to_vbak ,and if it stops there Check for vbak-lifsk .
    Write a condition to set the deliveryblock that is vbak-lifsk = 'xx'.
    2)then regarding your second point ...what is the middle ware used to interact with legacy system
    let me know

  • User Exit for sale order for adding a new partner

    Hi
    i am having the Scenario to add a new partner in  sales order in both VA01 / va02 transaction .
    i am using the exit named MV45AFZZ .   (USEREXIT_MOVE_FIELD_TO_VBAP) for this scenario.
    Its perfectly working for VA01 , but not VA02 .. why ..
    can any1  explain me ..

    Hi Irfan,
    You want to add partners in Sales order, the partners data will be saved in VBPA table.
    The USEREXIT_MOVE_FIELD_TO_VBAP is used for values for fields at sales document item level.
    For you its working for VA01 because , you have modified the strucure XVBPA for partners
    data and it is not saved yet to the database table so it is available in VA01 and in VA02
    it is checking the VBPA table there this data will not have been saved please check VBPA
    for your sales order.
    Please check below things.
    1) Check whether you have passed UPDKZ in XVBPA UPDKZ has below values INSERT (I),DELETE (D),UPDATE(U) etc nad
    if it doent works
    2) Please check the SAVE_DOCUMENT_PREPARE form and check XVBPA here whether it contains the
    entries you modified if not use the same code as you used in USEREXIT_MOVE_FIELD_TO_VBAP
    then these changes will be saved to database and hopefully you will get it in VA02 as well
    also pleaseuse the flag UPDKZ whenever you modifying this tables for your case
    XVBPA-UPDKZ.
    Regards,
    Pawan

  • Planning for Sales orders for quantities greater than forecast in APO SNP

    Hi All,
    We have a requirement in which planning in SNP is done based on the forecast  quantity transferred from DP . Demand from Sales orders is not taken into consideration for planning . The PO's are created based on the forecast quantity only SO's consume forecast  . Now a situation arises where we have the sales orders quantity  ( say 400) is more than that of the forecast( say 300 ) , this means  for quantity of 100 no planning is being done by SNP. 
    We want to know are there any ways of getting the remaining quantity being planned by SNP
    The planning strategy used is 40 in ECC
    Thanks in advance
    Regards
    Surendra

    Hi Surendra,
    For better control, the forecast quantity should match the sales order quantity for plg strategy 40.  If there are cases when sales order quantity is greater than forecast, you can create a control check in ECC to inform the users who creates the sales orders to get a popup message to create a sales order with rush order type or any other type to track the excess sales orders received against forecast.
    In SNP, once this rush order is entered, upon subsequent net change heuristic plan which runs day night, it considers those excess quantities and puts up purchase requisitions and procurement & production can be planned based using those PRs in SNP.
    Please confirm
    Regards
    R. Senthil Mareeswaran.

  • Details for SALES ORDER for qty produced, Qty despatched etc.

    Dear  All ,
                                 pl help that user wants details for a t. code which can give details for produced qty , despatched qty & remaining qty to be despatched against a sales order .
    regards,
    sap11
    Edited by: sap11 on Jul 14, 2008 1:29 PM

    Hi,
    This is a report to be developed in SD.the report is dependend on SD module no need of abaper.
    this can be solved by sales information systems.
    transaction code is MCHI.
    thanks
    Kuntla

  • Select query for sales order for particular customer oder text and storage

    Hi All,
    I am trying to retriev customer order text and customer storage bin from the following select query, but it's giving huge number of records, I want to restrict the number of records.
    Select customer order text, customer storage bin
                       Select STXH–TDOBJECT, STXH–TDID
                       Where  TDOBJECT = VBBP
                              TDID = Y001
                              TDID = Y007
    Please let me know how to restirct the number of records.
    Thanks,
    Ranjan

    Try using the FM 'READ_TEXT'.
    NAME will be the order number concatenated with the item number.
    And you have the ID and OBJECT.  You may also need to use the LANGUAGE.
    Message was edited by:
            Matt Nagel

  • Third Party Sales Order, Receiving the Material and  Serial Number Status

    Hi all-
    We are starting a process with tracking of serialized product. One of the items we sell is a 3rd party drop ship item. I am having an issue getting the serials to show as a status of ECUS rather that AVAIL when receiving the PO. Anyone have some ideas what I may be missing? Do we need to add the another status in the config for receiving 3rd party.  Or is this something else?Thanks.
    -Larry

    Hello Larry - I am experiencing the same problem. Did you ever resolve this issue?
    Thanks

  • Swap between two different item categories in sales orders for sub-contracting

    Dear gurus,
    my requirement is to have the ability to swap between two different item categories for sales orders for sub-contracting.
    This should be controlled by a combination of the material and a value maintained the Usage field in the Customer Material Info Record (for example by entering a ‘V’).  A combination of Sales Doc Type, Item Cat Group and Usage should result in the creation of a purchase requisition.
    In the event that a process order is required instead of a purchase requisition (i.e. the product is to be manufactured in-house instead of sub-contracted) the user must have the ability to change the Item Category within the sales order to produce a process order.
    The user would just change the item category within the sales order, and the system would automatically remove the purchase requisition assigned to the SO, and create a process order and assign it to the SO.
    Can you suggest any possible solution?
    Thank you in advance.

    Hi Majlo,
    In my system, I checked.  First created sales order with third party line item and then changed item category to normal item category.
    Till Purchase order not created, I can change Item category of my sales order line item.
    In this case SAP inform by log and once save delete purchase requisition of that line item .
    For this you need to assign another item category as an manual item category in SPRO Item category assignment.
    After this user can manually change item category to other one manually, if PO do not exist.
    Please let me know if your query is different.
    Regards

  • BAPI for Sales Order Creation.

    Hello gurus,
    I want to create a sales order using BAPI.
    I have tried some BAPI's like BAPI_SALESORDER_CREATEFROMDAT1, BAPI_SALESORDER_CREATEFROMDAT2, BAPI_SALESORDER_CREATEFROMDATA, BAPI_SALESDOCU_CREATEWITHDIA.
    But I am not able to update the Miscellaneous Information like Mode of transport(VBAP-OIC_MOT), Forwarding Agent(VBAP-OIC_LIFNR), Base Location(VBAP-OIA_BASELO), Truck Number(VBAP-OIC_TRUCKN), Pipeline trip No.(VBAP-OIC_PTRIP), Pipeline operator´s external batch number(VBAP-OIC_PBATCH).
    Is there any other BAPI thru which i can update these fields while creation of Sales Order.
    The Fields which I can provide to BAPI as import parameter is:
    Order Type(VBAK-AUART),
    Contract(VBAK_VGBEL),
    SALES Org (VBAK-VGORT),
    Dist Channel(VBAK-VTWEG),
    Division (VBAK-SPART),
    Open Quantity (VBAK-KWMENG)
    Plant(VBAP-WERKS)
    Storage Location (VBAP-LGORT)
    Mode of transport(VBAP-OIC_MOT), Forwarding Agent(VBAP-OIC_LIFNR), Base Location(VBAP-OIA_BASELO), Truck Number(VBAP-OIC_TRUCKN), Pipeline trip No.(VBAP-OIC_PTRIP), Pipeline operator´s external batch number(VBAP-OIC_PBATCH).
    Thanks In Advance,
    Points will be rewarded for Best Solution......
    Yogesh Sharma

    hi,
    I can give u a suggestion .. try it ..
    its a quite a long process....
    in BAPI_SALESORDER_CREATEFROMDAT2
    there is a table EXTENSIONIN...
    here u can add append structure and carry on ur sales order creation
    Follow the process
    Customer Enhancement for VBAK, VBAP, VBEP
    Description
    You can use this parameter to transfer user-specific enhancments to a BAPI. The customer has to complete the EXTENSION structure and the system automatically continues processing it. If you have not defined any user-specific fields, then you can transfer a blank EXTENSIONIN structure.
    Technical information about Customer Enhancements
    The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.
    The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:
    CFIELD1, CHAR 10
    CFIELD2, CHAR 3.
    The customer also requires that these two fields can be maintained with the BAPI.
    1. Maintain structure CUTEST in table VBAP
    2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:
    Field name       Data element
    CFIELD1            CHAR1
    CFIELD2          CHAR1
    3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.
    4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.
    5. Adjust the following structures for customer enhancements to table VBAK:
    a) VBAKKOZ
    b) VBAKKOZX
    c) BAPE_VBAK
    d) BAPE_VBAKX
    6. Adjust the following structures for customer enhancements to table VBEK:
    a) VBEPKOZ
    b) VBEPKOZX
    c) BAPE_VBEP
    d) BAPE_VBEPX
    7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).
    8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.
    For example:
    You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
    The following entries are expected:
    Import:     BAPIVBELN-VBELN       = '0000004711'  Document number
                BAPISDHD1X-UPDATEFLAG = 'U'           UPDKZ for doc header
    Tables:     BAPISDITM-ITM_NUMBER  = '000020'      Item number
                BAPISDITMX-ITM_NUMBER = '000020'      Item number
              + BAPISDITMX-UPDATEFLAG = 'U'           UPDKZ for item
    You must complete the EXTENSION table as follows:
    STRUCTURE                          VALUEPART1       1234561234567890123
    BAPE_VBAP                       0000004711000020                 XYZ
    BAPE_VBAPX                      0000004711000020       X
    Further Information
    You can find more information in the BAPI programming guide in the chapter for enhancements to BAPIs.
    Notes
    You must complete the STRUCTURE field with the name of the relevant enhancement structure (BAPE_VBAK, BAPE_VBAP, BAPE_VBEP). You can complete the remaining fields with the append structures from the enhancement structures.
    At the moment, you can use the BAPI to store enhancements in the following structures:
    VBAK : An enhancement to header data requires an append structure to BAPE_VBAK and an enhancement to structure VBAKKOZ.
    VBAP : An enhancement to item data requires an append structure to BAPE_VBAP and an enhancment to structure VBAPKOZ.
    VBEP : An enhancement to schedule line data requires an append structure to BAPE_VBEP and an enhancement to structure VBEPKOZ.
    VBKD : If you are using an enhancement for header data, you must add an append structure to BAPE_VBAK. You also need to enhance structure VBAKKOZ. If it is for item data, you need to add an append structure to BAPE_VBAP. You must also enhance structure VBAPKOZ.
    If you also want to work with checkboxes, each X-structure must also contain an append structure.
    For example:
    A customer has created an order and wants to include the material long text (50 digits long).
    The EXTENSIONIN structure must be completed with BAPE_VBAP. Two fields have fixed definitions in this structure. These are in the VBAP host key (VBELN, POSNR). The customer sets up an append structure that contains field ZMAT50.
    Because the VBELN is normally blank when you create an order, the data can look like this:
    STRUCTURE   |BAPE_VBAP
    VALUEPART1  |          000010Customermateriallongtext50
                  VBELN     POSNR ZMAT50

  • BAPI or FM for Invoice made for sales order...

    Hi Experts,
    Is there any BAPI / FM for Invoices made for sales order for the month or date wise, party wise, etc.
    I want to make a report invoices made during the given period for sales order.
    Yusuf.

    check this BAPI to get invoice details
    BAPI_BILLINGDOC_GETDETAIL.
    see the documentation to know how to use.
    Regards
    Peram

  • Settlement for sales order  TAB item

    Hi Experts,
    1. Is that only when the sales order item status change from " Not invoiced " to Invoiced ", the settlement can be performed ?
    2. We have one sales order , which item category is TAB, we alreday GR for parts, GI for sales order, and invoiced to customer, when we run VA88, why there is no change on this item ?
    Thanks and Regards
    Shubin

    when u invoiced, then run VA88 (settlement).
    kapil

  • Form routine for sales order adobe forms

    Hi Friends,
    I have a requirement to create z adobe forms for sales order for customized output type.
    When i checked, there is no form routine designed for calling the adobe forms.
    So, i am planning to copy the standard print program which is available for script and smartforms and creating a z form routine to include the function modules for calling the adobe form.
    Can any one please let me know whether have you worked in any of the same kind of situations and my apporach is ok or anything else can be done.
    Thanks & Regards,
    Prabu

    Hello,
    Plz check your caller program for the same and just find out the output type. for that purpose use the Tcode: NACE for finding the output type than proceed accordingly.
    Regards,
    Akg

  • Similar Functionality as VF31 or VL71 for Sales Orders

    Hi Experts,
    VF31 and VL71 is for mass processing of outputs for Delivery & Billing documents. Is there similar functionality for sales orders?
    Regards
    Lawrence

    Hi Lawrence,
    There is no tcode, but you can mass process outputs for sales orders using the program SD70AV1A

Maybe you are looking for

  • How do I stop calendar from coming on automatically and overiding gmail so that I cannot access it. I can use windows explorer and this does not happen.

    When I use firefox to access my gmail account, the calendar comes on by itself and I then cannot get to my emails. If I get the gmail account by windows explorer this does not happen. What can I do within firefox to stop this from happening. It just

  • Premiere Pro CC crashes when trying to Export Media

    I really hope someone can help me with this. I bought a brand new Dell XPS 15 because I will be studying multimedia production next year. Next week I'm registering for the art school and I'll be able to buy a CC student license. I installed the Creat

  • I7 mac mini powers off.

    My i7 mac mini goes to sleep and appears to power off.  It cannot be awakened unless I unplug the power cord, plug it back in and press the power on button.  I then get a full reboot.  Am I resetting the SMC each time?  It's the only thing that works

  • Overprint Preview - I've hit something now its awry!

    I've hit a key command where in overprint preview my metallic colours are previewing darker. They PDF fine, but the preview is all stuffed. Any idea what I've done? I could leave it but my OCD won't let me. Thanks

  • This is a HUGE ERROR. 80 g/b

    http://img182.imageshack.us/img182/31/asdffewoc3.png It's as if all of my music AND videos were somehow "transformed" to fit in the "Other" category instead of where they're supposed to be. When I tried adding a song, nothing happened--only added the