Get sales order in condition routine of VF01

Hi
I need to get the sales order number (or at least the delivery number) in a condition routine which is called in VF01.
I can't find any structure/internal table/variable where it is passed.
Does anybody have an idea where to find the information?
Thanks & best regards,
Basti

Ok
lets play with CALL STACK.
go in debug mode in the routine
(I suppose you use the old debugger, with the new one is the tab number 4)
the call stack is the memory of the caller in your program.
if you double click on a line down, you will see the code corresponding of the program that call your method/routine/form ... 
and you could get the memory also
In my example, I take a local variable corresponding to the first line (no 1). If I try to see the content in my last program (SAPLSD41) I can't, but if I put the call programme between ()  I can.
do you understand the logic ?
regards
Fred

Similar Messages

  • How to get sales order item information

    Hello All,
       I ahve defined a new, custom condition type and created a routine in alternate condition type.
       While creating a sales order, when the routine is getting executed, i need the sales order item information. i.e. i need to access VABP table. but when i put a break point, in the routine, i cant see the detials of item.
    can some one tell me how to get item data, in the routine.
    (p.s. this is while creating sales order)
    thanks a lot in advance
    Best Regards
    Amarender Reddy B

    Hi
    I suppose you're speaking about pricing condition, if it's so all information u can have are in structure KOMP and KOMK. The condition record data should be in the internal table XKOMV.
    If there informations u need aren't there u should enanche those structure.
    Max

  • Sales order Item condition currency

    HI
    i have following requirement
    In sales order item conditions Currency should change automatically From USD to INR, it means USD is sales document currency.
    But in PO currecny is INR, so i want to populate INR in Sale order items condition type PR00, there is BAPI which trasfer PR00 price from PO header, but now i want transfer the same currency type in to Sales order.
    regards
    satsih

    Hi thanks for your input, Using routine is effect to other sales document types, i want for ZDR (debit memo request) only not for all documents. any other solution
    regards
    satish

  • Tax code entry in sales order item conditions  from excel template

    Hi experts ,
    I have a requirement , in which  tax code in sales order item conditions should be determined from an excel template.
    A Z transaction will fetch values from the template & create sales order in which tax code will be detrmined from the template only, irrespective of the value maintained in condition records.
    Kindly suggest the way, how this can be implemented. Currently tax code field in item conditions of sales order is greyed out and hence cann't be maintained directly in sales order.
    Is there any user exit which can take values from excel template & populate tax code in sales order, bypassing condition records?
    Thanks in advance,
    Vimal

    Hi Vimal,
        I don't understand why you want to read tax code from excel, bcoz what ever criteria you are trying to determine the tax code from excel sheet you can build a condition table and arrive at the appropriate tax code with condition technique.
    Just think, if you some how achieve to get the tax code to pick up from the excel sheet, what will happen if you want to change the order after few days or create a subsequent document? the system will try to read the record from the condition records and may go for a toss.
    My opinion is, suggest the user/business to use the condition technique and build your condition tables with all possible options and arrive at the tax rate and tax code.
    If you still want to go ahead with bespoke develpoment, request you to further specify your requirment so that someone can help you.
    I don't think it is the right idea to reinvent the wheel again.
    Regards
    Raj

  • Which table I can get sales order no from delivery numbar.

    Hi,
    I want sales order no from delivery no. right now I am using table VBFA where I am passing VBELN and POSNN and geting sales order no. but performance of select query is very poor bcouse I am not passing first two key fields in the select query.
    Is there any other tablefrom where we can get sales order no. from delivery no. so that performance of report can be improved.
    Thanks,

    hi,
    sales doc header ( table VBAK ) copy to Delivery header table( LIKP)
    sales doc item table ( VBAP) copy to Delivery item table( LIPS)
    you can see this in copy control VTLA ,
    now u want slaes doc no. from dilv doc. no.
    so go to t-code se11.....
    fill table LIKP u will get VBELN field for deliv doc no, & TERNR field for sales doc. no.
    so if u want to call sales doc no from dilv doc no.. u can use table LIKP in ur report.
    i hope it will help u.

  • How to get  sales order data in R/3. Any FM?

    Hi ,
    Is there any FM in R/3 to get sales order data.
    In CRM we use CRM_ORDER_READ to get the Header and Item details. Like wise FM in R/3 is required.
    Actually I have to test 'Usage' in sales tab of VA01/VA02/VA03.
    How to get the order details? what is the user exit for ORDER save?
    If any body knows please do let me know.
    Thanks and Regards
    Harish

    Hello Harish,
    Please use BAPI_BUSPROCESSND_GETDETAILMUL to read details of sales order. This works as a remote enabled counterpart of CRM_ORDER_READ.
    Similarly if you want to display sales order from R/3, use FM BAPI_BUSPROCESSND_DISPLAY.
    Regards
    Kaushal

  • Sales order pricing conditions

    Can any one let me know what are the tables that are updated while working with sales order pricing conditions .......      r sales order conditions

    Hi Ali,
    VBRK     Billing document :header data
    VBRP     Billing document :Item data
    KONH      Conditions header
    KONP     Conditions items
    KONV     Procedure ( billing doc or sales order)
    KOND     Conditions (data)
    These tables will give sufficient information on Sales order pricing and its billing conditions etc.
    best regards
    Ramakrishna

  • User exit to modify sales order pricing condition

    Hi Experts,
    I need ot modify Sales Order Header Condition (ZFRH), Condition Value (KWERT) for Transaction VA01 & VA02
    I agree there are many user exits which will modify XKOMV-KWERT structure and can populate what ever value we insert.
    But the value we insert is inserting into line item condition and the total of all line items is populating in Header .
    I need to modify only Header condition without populating Line items
    Thanks ,
    Basheer .

    Hi:
    Program : MV45AFZZ
    search for USEREXIT_NUMBER_RANGE.
    BR,
    Manthana

  • Sales Order-Shipping Conditions from Sold-to-Party

    Hi Guys
    When sales order created, shipping conditions copied from Sold-to-Party.  At that time, in SP, shipping conditions maintained wrongly. 
    After creating Sales Order, shipping conditions modified in SP, but system not allowing to modify shipping conditions in sales order.  Because of this, shipping point has not been determined.  Could not change manually also.
    Please suggest on this.
    Regards
    Uma

    Dear Uma
    On your comments
    "Because of this, shipping point has not been determined",
      I dont think, it could be bcoz of shipping condition.
    If Shipping Point is not flowing in sale order, then you need to check in OVL2 where you have to maintain the shipping point for the combination of Shipping Condition from Customer Master, Loading Group from Material Master and Plant.  So check whether you maintained this. 
    Meanwhile, with regard to the field Shipping Condition which you could not make change, please note that even if subsequent documents are generated, this field will be in editable mode only and if you try to change, system will give you a message
    -  Shipping Conditions were changed, Redetermine Routes and shipping of all items
    and if you click "Redetermine", the new shipping condition will take place.
    So, can you please let me know whether your sale document type is copied from standard OR where the screen controls are there.
    thanks
    G. Lakshmipathi

  • What's the name of FM for getting Sales Order Header / Item Status info

    Hello All:
    Do you know what's the name of Function Module for getting Sales Order Header / Item Status Overview ? Any sample code will be very much appreciated.
    Basically, I am trying to create a Webpage where user can enter the Sales Order document number and will return the Sales Order: Status Overview.
    Thanks,
    Dipankar Biswas

    Thanks everybody ! Appreciate for your prompt response. I was also looking for some sample code, and I did find some on. And here is one. I still have to try the code, but here is for all your reference:
    *& Report ZBAPI_SALESORDER_GETSTATUS *
    *& Read and Display the Sales Order Items and Status of the Order *
    REPORT zbapi_salesorder_getstatus NO STANDARD PAGE HEADING LINE-SIZE 200 LINE-COUNT 33(3).
    TABLES: vbap. "Sales Document Item Data.
    DATA: wa_bapireturn TYPE bapireturn,
    wa_bapisdstat TYPE bapisdstat,
    it_bapisdstat LIKE STANDARD TABLE OF wa_bapisdstat.
    TYPES: BEGIN OF ty_mat_name,
    matnr TYPE makt-matnr,
    maktx TYPE makt-maktx,
    END OF ty_mat_name.
    DATA: wa_mat_name TYPE ty_mat_name,
    it_mat_name LIKE TABLE OF wa_mat_name WITH KEY matnr .
    PARAMETERS: p_vbeln LIKE vbap-vbeln DEFAULT 5573.
    START-OF-SELECTION.
    SELECT matnr maktx FROM makt INTO TABLE it_mat_name.
    CALL FUNCTION 'BAPI_SALESORDER_GETSTATUS'
    EXPORTING
    salesdocument = p_vbeln
    IMPORTING
    return = wa_bapireturn
    TABLES
    statusinfo = it_bapisdstat.
    IF wa_bapireturn IS INITIAL. " Successful Execution.
    WRITE: / 'Document No: ' COLOR 1, 20 'PO Number : ', 40 'Status' , 50 'Delv.Stat',60 'Item No', 80 'Material', 90 'Material Description', 130 'Net Price' COLOR 2.
    ULINE.
    LOOP AT it_bapisdstat INTO wa_bapisdstat.
    WRITE: / wa_bapisdstat-doc_number. " Sales Document Number.
    READ TABLE it_mat_name INTO wa_mat_name WITH KEY matnr = wa_bapisdstat-material.
    WRITE: /20 wa_bapisdstat-purch_no, " Customer Purchase Order Number
    40 wa_bapisdstat-prc_stat_h, " Processing Status
    50 wa_bapisdstat-dlv_stat_h, " Delivery Status
    60 wa_bapisdstat-itm_number, " Item Number
    80 wa_bapisdstat-material, " Material
    90 wa_mat_name-maktx, " Material Description
    130(10) wa_bapisdstat-net_price. " Net Price
    CLEAR wa_bapisdstat.
    ENDLOOP.
    REFRESH it_bapisdstat[].
    ELSE.
    WRITE: wa_bapireturn-message.
    ENDIF.

  • Any function module or bapi to get sales order number and invoice number?

    hi all,
    with delivery order number provided, do we have any function module or bapi to get sales order number
    and invoice number?
    thanks.

    Hi,
    Check
    BAPI_SALESORDER_CREATEFROMDAT1
    BAPI_REMUREQSLISTA_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Vendor Billing Documents
    BAPI_REMUREQSLISTB_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Payment Documents
    BAPI_REMUREQSLISTC_CREATEMULT  Agency Business: BAPI Create Invoice Lists from Posting Lists
    BAPI_REMUREQSLIST_CHANGEMULT   Agency Business: Change Invoice List Documents BAPI
    BAPI_REMUREQSLIST_GETLIST      Agency Business: BAPI Determine Detailed Data for Invoice List Documents
    BAPI_REMUREQSLIST_RELEASE      Agency Business: BAPI Release Invoice List Documents to FI
    Edited by: Neenu Jose on Nov 26, 2008 8:53 AM

  • How to get sales order data with GL tables

    I want to get sales order details from my GL query. I need to get item number, quantity and customer PO from there. Here is my query from GL.
    SELECT PH.po_header_id,
      I.GL_DATE,
      R.je_header_id JE_HEADER_ID,
      R.je_line_num JE_LINE_NUM,
      aeh.org_id ORG_ID ,
      I.invoice_num TRX_NUMBER_C ,
      ael.description COMMENTS ,
      ael.ACCOUNTED_CR ACCOUNTED_CR,
      ael.ACCOUNTED_DR ACCOUNTED_DR,
      ael.code_combination_id CODE_COMBINATION_ID,
      ael.currency_code CURRENCY_CODE,
      ael.entered_cr ENTERED_CR,
      ael.entered_dr ENTERED_DR,
      PH.segment1 PO_ORDER_NUMBER,
      GL.segment1 company,
      GL.segment2,
      GL.segment3,
      GL.segment4,
      GL.segment5 account
      ,ael.description
      ,PD.quantity_ordered, PD.amount_billed, D.quantity_invoiced,  D.unit_price
    FROM gl_import_references R, --ok
      gl_je_categories jc,
      ap_ae_lines_all AEL, --ok
      ap_ae_headers_all AEH, --ok
      ap_invoice_distributions_all D,
      ap_invoices_all I,
      ap_accounting_events_all AE,
      po_releases_all PR,
      po_headers_all PH,
      po_distributions_all PD,
      po_vendor_sites_all VS,
      gl_code_combinations GL
    WHERE 1=1
    AND jc.je_category_name       = aeh.ae_category
    AND PR.po_release_id(+)       = PD.po_release_id
    AND PH.po_header_id(+)        = PD.po_header_id
    AND PD.po_distribution_id(+)  = D.po_distribution_id
    AND ael.third_party_sub_id    = VS.vendor_site_id
    AND AE.accounting_event_id    = AEH.accounting_event_id
    AND I.invoice_id              = AE.source_id
    AND AE.source_table           = 'AP_INVOICES'
    AND AEH.ae_header_id          = AEL.ae_header_id
    AND DECODE(ael.source_table,'AP_INVOICE_DISTRIBUTIONS', AEL.source_id,NULL) = D.invoice_distribution_id(+)
    AND AEL.gl_sl_link_id         = R.gl_sl_link_id
    and ael.code_combination_id = GL.code_combination_id

    Then your query is completely wrong.
    Your query is looking at Purchase Order tables.
    If you want sales order data, you should be looking at OE tables (such as OE_ORDER_HEADERS_ALL, OE_ORDER_LINES_ALL etc.)
    Sandeep Gandhi

  • Function module to get Sales Order classification.

    Hello everyone,
    Can someone give me a function module to get Sales Order classification? Really appreciate it.

    Hi
    Check the following BAPI's:
    BAPI_OBJCL_GETDETAIL
    BAPI_OBJCL_CHANGE
    or use the fun module:
    CLAF_CLASSIFICATION_OF_OBJECTS.
    Reward points if useful
    Regards
    Anji

  • How to get sales order number before saving in VA01 by using parameter

    Hi,
    Please let me know how to get sales order number in transaction VA01 before saving it by using parameter in SU3.
    I tried to set parameter in SU3 "AUN", but it is not working as required, means sales order number is not appearing before saving.
    can you please suggest how to do it?
    Thanks & Regards.
    Rahul Verulkar

    Hi,
    In case of Support project, we get the high severity issues from users and needs to be closed withn 2 hours... so what we do we get the requirement from user and checking the same in production from our id, but we can not save the sales order as we are not authorized to do the same, so in such cases it is required to get the sales order number before saving... where we can guide the users.... but actuallly it is not getting saved in the table until and unless u save it manually. It works like a material master... when u create material master, the material number appears in advance in material number field "MATNR"
    If it is possible can you please suggest step by step to work on parameter in SU3 for sales order number before saving.
    Thanks & regards,
    Rahul Verulkar

  • How to get sales order information in COPA datasource

    Hi All,
    I wish to get sales order information like Customer, Sales office, Sales group etc in COPA datasource. Presently all this information is not available and the fields display blank value. Can you please guide me through the steps to achieve this.
    Thanks in advance,
    Sananda

    Hi
    They actually create Generic extraction for COPA modules..especially all finance modules. Hope you are aware of  it and do you know the steps for COPA?
    Any check all the below links as well lot many threads for COPA available. pls chek that as well
    http://sap.seo-gym.com/copa.pdf
    http://searchsap.techtarget.com/answer/Steps-for-a-generic-extraction-of-FI-CO-COPA-and-LO-in-SAP-BW
    Problem with COPA extractor 1_CO_PA<...>
    Delta Mechanism : COPA extractor
    steps for FI-SL and CO-PA Extraction
    COPA extraction steps for BI 7.0
    This link would be help ful:
    http://www.sap-img.com/business/copa-extraction-steps.htm

Maybe you are looking for

  • Problem in Inbound delivery creation

    Hi all, While creating Inbound delivery for a scheduling agreement in VL31N while saving the document i am getting the following error Item does not exist. and its getting terminated. Regards, Ram.

  • PC content viewer shows only low res thumbnails of PDF folios (from folio builder)

    Since i can't seem to find a similar question, here's my story: I've recently held a small class of 2*18 students, running various versions of indesign (mostly Cs6 and CC) and various OS (MacOs, Win7, Win 8). On the Win 7 and 8 systems, some of the s

  • How to place the applications developed by me in ipod touch.

    We are developing some applications which would work on Apple iphone and ipod.So i know how to upgrade my O.S from 1.1.2 to 2.1 firmware.But,what should i do after upgrading o.s. Please help me out which could help me in my work.

  • TS440 / LSI 9240-8i RAID 5 not possible

    Hello, I´ve received our TS440 with the built in LSI MegaRAID card. I am able to see all 3 drives - but I am not able to get RAID 5 up and working. Is this something which has to be licensed first? Firmware has been updated to the latest one yesterda

  • Location Appliance Help required

    Hello, I have a WCS,WLC and LOC deployed. The integration betwen the WLC and WCS is working perfectly. We didn't put a lot of access points in the deployment because we didn't need acurate location tracking but at least we need some. The problem is t