Get OTF data for a sales order document

I have a problem in getting the information of the created sales order document number  as OTF data. I need this OTF data so to convert into PDF format using function module 'CONVERT_OTF_2_PDF'. My situation is i am keeping a parameter for sales order document number . when i execute the report after giving a sales order document number, i should get the OTF data .

Hi!
Firstly you have to define what technique is used for creation of sales order as printed document - smartform or sapscript. Then proceed as follows.
In case of smartform:
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZFORMNAME'
IMPORTING
fm_name = v_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
CALL FUNCTION v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
IMPORTING
job_output_info = w_return
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
i_otf[] = w_return-otfdata[].
In case of sapscript:
  options-tdgetotf = 'X'.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
options = options
  CALL FUNCTION 'CLOSE_FORM'
IMPORTING
  RESULT                         =
  RDI_RESULT                     =
   TABLES
     otfdata                        = i_otf
   EXCEPTIONS
     unopened                       = 1
     bad_pageformat_for_print       = 2
     send_error                     = 3
     spool_error                    = 4
     OTHERS                         = 5.
i_otf -
Regards,
Maxim.

Similar Messages

  • Not getting single delivery for two sales orders

    Hi Sapians,
    I am getting one delivery for two sales orders in VL10A.  But in another case, out of two sales orders, for one order I went to partner functions and changed the address line of ship to party while creating sales order.(Since for that particular order the ship to address is different). then as usual I proceeded to VL10A. But this time system gives two seperate delivery document numbers instead of one which is given earlier. Can any of the experts help me in this regard.
    Thanks for your response in advance.
    Raksha Agarval

    Hi Raja,
    Just now I came out with exact problem. While creating sales order, in the header data partner function tab, if we select the ship to party line item and go for details tab and change the address first line item (that is street number), the same change is also if we do in second sales order also, then if we go for delivery in VL10A, then system gives two delivery documents instead of one.( though, all the requirements are met, like same plant, shipping point, shipping conditions, incoterms.. etc).
    Even after meeting the requirements, as per SAP standards also why system giving two delivery documents? is the problem.
    Please come with possible reasons
    Thanks in advance,,
    Raksha.

  • Extracting material classification data for given sales order

    Hi Experts,
    Requirement is I Need to display a report with material and its characteristics values for given sales order. Please let me know if there is any FM/standard tables involved to display the below fields.
    Sales order number, Sales order line item number , Material number , Characteristic Name(ATNAM),Characteristic description(ATBEZ),Characteristic Value(ATWRT),Characteristic value description(ATWTB).
    Thanks & Regards,
    Pavee.
    Moderator message: "spec dumping", please work yourself first on your requirement.
    Edited by: Thomas Zloch on Oct 14, 2011 1:30 PM

    Hi Keshav,
    Thanks for spending your precious time in replying to my thread.
    I did a search before posting, I got an FM which is we cannot use due to performance issue.
    Thanks for letting me know that sales order  has material and material has characteristics,
    But For each characteristics that material has we will have several values, you will be selecting whichever is appropriate based on the requirement.
    If you know the answer pleases post. I have enough patience to wait for answers from other experts.
    Thanks
    Pavee.

  • Who to get Actual Shipment Date for the Sales Order

    Dear All,
         How to Get Actual Shipment Date for the given sales order.
    REgards
    sudheer

    Hai,
    If you want the actual shipment date of an order call the function module RV_ORDER_FLOW_INFORMATION and pass the order number as vbeln in the structure COMWA.select the values from the return table which corresponds to 'J' type which are delivery and get thedate.
    THis will give the actual delivery date (if created).
    Oher way is to look for vbeln in table LIPS using VGBEL = order number as the selection criteria.
    Cheers,
    Sandeep

  • Tables or FM needed to get purc req for a sales order

    hi
    when you go to the /sapapo/rrp3 transaction ( product view ) in SCM system you will get lot of views for a given product and location like elements, periods, pegging overview etc.,. . In the pegging overview for example we have recpt element and reqmt element colums which contain the sales order number and purchase req number. I want to know the database tables names where i can get this information. basically i want to what are purchsae reqs or purchase orders linked to a given sales order or material.
    thanks

    You can go to SE11 and see all field of table /SAPAPO/MM_DOC and their description.
    It will tell you details of GUID.
    Than you have to go to individual table and read actual product from GUID.
    like MATKEY for Material GUID.
    /SAPAPO/ORDER_GUID     CHAR     22     0     GUID of an Order Object
    /SAPAPO/LOCID     CHAR     22     0     Internal Location Number (Customer, Supplier, or Plant)
    /SAPAPO/MATID     CHAR     22     0     Internal Number (UID) for Product
    Manish

  • About data for blocked sales order

    hi friends,
    i have one requirement . i.e i want to create the BLOCKED SALES ORDER , whate are the fields require for the creation.
    if there is any BAPI for this please tell me.
    help me
    naresh

    Hello Naresh.
    You can Show your blocked Sales order Using table MVKE(Sales Data for Material) and TVMS(Materials: Status in Sales and Distribution).
    Logic is :1. Check Field MVKE-VMSTA.
                 2. find corresponding entries of  MVKE-VMSTA in Table TVMS.
                     by matching  MVKE-VMSTA = TVMS-VMSTA.
                 3. For Above same Entries see the Blocked check in Field TVMS-SPVBC.
                    IF  TVMS-SPVBC = 'B' means this sales order is blocked.
    and check all matnr of MVKE according to this logic.
    In case any Problem,you can let me know so that i can help you in better ways.
    Have a Nice Day,
    Regards,
    Sujeet.

  • Is it posible to find out the billing date of any sales order..?

    Hi all,
    Is it posible to find out the billing date of any sales order..?
    If it is posible tell  me how to do.
    Thanks

    Hi ,
    Can you explain more on this.
    I think you want to know billing date for the sales order. Here the billing is already done.
    If so , go to vbfa table and then give the sales order number in VBELV field. You will get many records. But VBTYP_N give as M ( Invoice ) and find out the document number and then pass it in billing table VBRK and get the date of creation.
    If it is like proposed date while creating the sales order ,
    then i am not sure about it.
    Regards,
    Venkatesh

  • Discount calculation for a sales order in CRM

    Hi All,
    I need to change the pricing data for a sales order item using a BAPI. For this I want to make use of the BAPI_BUSPROCESSND_CHANGEMULTI. But I am not sure as to which of the fileds to be used for the discount rate calculation. The scenario is, from a Custom UI we will change the discount given for an item and the same has to be reflected in CRM and the calculation for that also will be carried out in CRM.
    Can somebody throw some light on this?
    Regards,
    - Prasenjit

    Hi Richard,
    There is no pricing procedure in the UI. For every calculation the UI is calling a BAPI and changing the UI accordingly. Everything needs to be done in CRM.
    The requirement is basically to fetch the pricing details for a contract that is under creation. The main funda is to obtain the pricing document guid, which will intern fetch the pricing condtion rates corresponding to a condition type. Can you tell me how to do that?
    Regards

  • For a Sales order, what is Actual Delivery Date to Customer?

    Hi Experts,
    I am an ABAP consultant. In a particular report, for a Sales order I am asked to display:
    ‘Delivery Create Date (LIKP-ERDAT)’,
    ‘PGI Date’,
    ‘Requested Delivery Date (VBAK-VDATU)’ and
    ‘Actual Delivery Date to Customer’.
    And in addition, I also have to show:
    ‘No: of days between Order Create Date to Delivery Create Date’,
    ‘No: of days between Delivery Create Date to PGI Date’,
    ‘No: of days between Requested Delivery Date to Actual Ship Date’ and
    ‘No: of days between Order Create Date to Actual Ship Date’.
    I’ve searched SCN for similar questions but I couldn’t get clarity. I’ll be very grateful if somebody can explain me how to find the ‘Actual delivery date to customer’ and what is the difference between this date and ‘Billing date’. Also, please explain, the difference between ‘Delivery Create Date’ & ‘PGI’?

    Hi Rashmith,
    It seems the report is related to delivery. Below is the explanation for the different terms you mentioned in your question.
    Delivery Create Date (LIKP-ERDAT)---- when a delivery is created with or without reference of an order system writes the date of creation time of creation and created by in the header data. Creation of delivery does not means that goods are dispatched. There are many steps further after a delivery is created before goods are dispatched.  For example I have created an order, created delivery on 01.01.2014; delivery date will always be 01.01.2014.
    PGI Date (LIKP-WADAT_IST)------ Post goods issue date is the date on which goods move out of the company to carrier. This is the last step of delivery. When delivery is created system derives different dates of planning; at this stage it will determine the planned PGI date (LIKP-WADAT) and when actual PGI  happens system writes the date in LIKP-WADAT_IST which is actual goods issue date.
    Requested delivery date (VBAK-VDATU)------When order is created for a  customer he asks for a material, a quantity and a date on which he wants the goods. This date on which customer wants the goods is called requested delivery date. Based on the requested delivery date system will check feasibility of delivering the goods on the requested delivery date based on the delivery scheduling.
    You can get the RDD based on the below logic.
    Input the delivery number in VBFA-VBELN and VBFA-VBTYP_V and get VBFA-VBELV.
    Input VBFA-VBELV in VBAK table and get the value of VDATU.
    Actual Delivery Date to Customer-----Actual delivery date is Actual post goods issue date (LIKP-WADAT_IST). This is the date on which goods are issued to the customer and customer is liable for billing for the goods dispatched.
    Difference between the Actual delivery date (Actual goods issue date) and billing date.
    Normally as per standard SAP, once goods are moved out of the company customer is liable to be for billing for the goods dispatched. So by default in standard SAP system copies the actual goods issue date (LIKP-WADAT_IST) as billing date (VBRK-FKDAT) irrespective of the date of creation of the invoice (If delivery is goods issued on 01.01.2014 and billing document/invoice is created today i.e. 14.04.2014, system by default will take 01.01.2014 as billing date). And this is the correct practice.
    However  if you want the current date as the invoice creation date instead of the actual goods issue date we can control it by copy controls feature given in SAP.
    So based on the copy controls setting, it may be different from the actual goods issue date/ actual delivery date.

  • Billing document for multiple sales orders

    Hi All,
    I am in to ECC 6.0. How can i get single billing document for multiple sales orders?
    Can anyone tell me those configuration settings?
    Thanks
    Patel J

    Dear Jaganath,
    For Single Invoice, for multiple Sales Order, following details must be same:
    1. Sales Document Type for all Sales Order must be same
    2. Payer
    3. Incoterms
    4.Payment Term
    5. Account Assignment Grp - Customer
    6. Billing Date
    7. Exchange Rate
    8. Foreign Trade Data
    Now, in Copy-Control Settings between Sales Order and Billing (T. Code: VTFA - Order to bill copying control), Select your combination for Sales Order-->Invoice;
    and Double Click: Item (from Left-Hand side, Dialog Structure) and Double Click on to your Item Category.
    Here, in Filed: VBRK/VBRP, maintain Routine: 003 - Single Invoice.
    Important: Also, if Sales Orders have different Divisions,
    T. Code: VOV8 - Sales Document Type Maintenance
    untick the Box: Item Division.
    T. Code: VOR2 - Common Division
    Assign those Divisions to Common Divisions.
    Best Regards,
    Amit

  • Report for viewing Sales order no against delivery date & actual GI date

    Hi Experts,
    Is there any report for viewing Sales order no against delivery date & *actual GI date*
    Because in VL06F , i can only able to get planned GI.
    Please guide regarding the same where i can get 'ACTUAL GI DATE ' against above combination .
    Regards,
    Sujit S.

    dear Hrishi,
    i followed your suggestion, but couldn't get desired results,
    here i can get planned GI date, where i wanted to get Actual GI date for complted deliveries,
    thanks for your valuable reply.
    @ G. Lakshmipathi ;-
    i think i will need to develop z-report for fetching the data from the tables
    VBAK (to get sale order reference) and
    LIKP (to get delivery and actual GI date)
    thanks for your reply,
    Regards,
    Sujit

  • Scehdule Line Date getting change to future date once the Sales Order is saved

    Hello Experts,
    Good Morning to you all,
    This is with respect to the Issue we are facing for the Orders having Product Allocation on multiple materials. Please find enclosed the detials below.
    Issue : Scehdule Line Date getting change to future date once the Sales Order is saved. These Order's are having Product Allocation on multiple materials.
    Description:
    We have implemented Product Allocation few months back.
    We have Product Allocation on multiple materials which are in demand and has been reserved for the Customers of different PA behaviors.
    When we are trying to create the Sales Orders for the normal customer who is not on Product Allocation. The Order Schedule Line is getting changed to future date once the Sales Order is saved after initial creation.
    These Order's are having materials of Product Allocation.
    I have enclosed the sample screen shot of the error we are getting which saving the Sales Order and also the Order Schedule Line screen shot showing future date.
    Error Message : There may be Product Over Allocation in Delivery Group 001.
    Message No : VV023
    This is a random behavior we are coming across and out of 10 Order 2 or 3 Orders is getting this Issue.
    Please share your inputs how to rack this Issue.
    Your suggestions will be highly appreciated.
    I am unable to upload the attacments dont know what the reason.
    Thanks,
    Farhan.

    Check whether you need to carry out the coding corrections as recommended in the following note:-
    Note 52067 - Message VV023/VV024, but no prod.alloc.processing    
    But I wonder this is for older versions and not sure whether this would help you to overcome from the issue.
    G. Lakshmipathi

  • How I can get the Billing Type for the sales order and its items

    How I can get the Billing Type for the sales order and its items. I mean from which SAP tables and how?

    Hi,
    You need to use two tables.
    First use VBFA. Enter the sales order number in the field Predecessar and the value M in SubCt field. This will give all the billing document number for the sales order items.
    Then use the billing document numbers in table VBRK, where in you can get the billing document type.
    Regards,

  • I have just reinstalled Adobe Acrobat X1 and I can't save any PDF's that are emailed to me. I just get "This document could not be saves. There is a problem reading this document (21)" and then when I click OK i get "insufficient data for image"  Help!

    I have just reinstalled Adobe Acrobat X1 and I can't save any PDF's that are emailed to me. I just get "This document could not be saves. There is a problem reading this document (21)" and then when I click OK i get "insufficient data for image"  Help!

    More information about this issue can be found here:
    https://forums.adobe.com/thread/1672655
    A "quick" fix that worked for me was to uninstall Adobe... then download the base install for Adobe Reader 11.0.
    Then download each of the individual updates and run them sequentially. 
    I've installed back up to the last security update which is version 08 and have been able to do normal Save As operations.
    You will have to disable automatic updates in order to stay at version 08 until Adobe resolves this issue in a later release.
    http://www.adobe.com/support/downloads/product.jsp?product=10&platform=Windows
    Adobe Reader 11.0 - Multilingual (MUI) installer    AdbeRdr11000_mui_Std
    Adobe Reader 11.0.01 update - Multilingual (MUI) installer    AdbeRdrUpd11001_MUI.msp
    Adobe Reader 11.0.02 update - All languages    AdbeRdrSecUpd11002.msp
    Adobe Reader 11.0.03 update - Multilingual (MUI) installer    AdbeRdrUpd11003_MUI.msp
    Adobe Reader 11.0.04 update - Multilingual (MUI) installer    AdbeRdrUpd11004_MUI.msp
    Adobe Reader 11.0.05 security update - All languages    AdbeRdrSecUpd11005.msp
    Adobe Reader 11.0.06 update - Multilingual (MUI) installer    AdbeRdrUpd11006_MUI.msp
    Adobe Reader 11.0.07 update - Multilingual (MUI) installer    AdbeRdrUpd11007_MUI.msp
    Adobe Reader 11.0.08 security update - All languages    AdbeRdrSecUpd11008.msp

  • Partial billing documents for 1 sales order

    Hi all,
    How to create partial billing documents for 1 sales order,
    Note: Billing will be done against sales order not delivery,

    hi
    go to VF01 and enter your sales document and then from the menu bar select the icon -- selection list you will get the list of items in the sales order you can select the items and select the icon copy you can do the partial billing
    regards
    vardhan

Maybe you are looking for