Create document with refrence + update some fields by passing some  values

Hello Experts,
I have a small problem . I have to create the sales order from BAPI ...but the scenario is
      have to create with refreence to another document
      some fields like condition types or material or order quantity etc are passed from an excel sheet
hence some information which is populated in excel sheet should be picked up rest everything should be picked up
from the refrence document
How can use both information (from the refrence document and externally passed from the excel)  and create a new document
please suggest!!!!
regards,
Khushy

Hi,
I am  not sure whether I really understand your request. Let me try to help.
> Example: <FT_TAB> TYPE STANDARD TABLE,
>                 <FS_TAB> TYPE ANY,            
>
> DATA: INT_TAB  is my dynamic table values.
>
>
> LOOP AT INT_TAB.
>  ASSIGN COMPONENT 'MATNR'  OF STRUCTURE <FS_TAB> TO <F_VALUE>
> <F_VALUE> = INT_TAB-MATNR.
>  APPEND <FS_TAB> TO <FT_TAB>
Here <FT_TAB> must already be assigned to some internal table with a given (dynamic) structure. Did this happen before this piece of code?
What I would do is to create a dynamic table (see documentation to CREATE DATA) with MATNR and the STYLE field (LVC_T_STYL). See the documentation for CREATE DATA - creation of internal tables. When collection the field descriptions for that internal table I would also build the field catalogue for the ALV.
Then assign <FT_TAB> to that newly created internal table, <FS_TAB> to a newly created structure (same as a table line).
Move the MATNR to component 1 (or component 'MATNR') of the table and fill the style table according to your needs. Then insert the <FS_TAB> into <FT_TAB>.
Finally call the ALV SET_TABLE... method with your dynamic table and your field catalogue.
Regards,
Gerd Rother

Similar Messages

  • Create PO with refrence to multiple PR

    Hi,
    We have requirement to create an automated program where one of the requirement is to create an PO with refrence to multiple PR for single vendor. As per my knowledge ME21N can be use to create PO with refrence to multiple PR, but from the technical point of view as this is enjoy transaction and it will not support BDC program.
    My question is, is there any other transaction code which we can use to create PO with refrence to multiple PR and it will support BDC program also.
    Thanks...
    Imran

    Hi,
    Go to ME21N, create wrt to the first line item and give the necessary fields, if you want to club the quanity of other PR's
    Just go to the Delivery schedule tab and enter the Purchase requision no in the field purch.req and the line item number in the Requisn item.
    Then the PO quantity will get changed as per the PR cumulative qty.
    Regards,
    RitiG

  • Creating Worksheets with Fill-In Form Fields

    What is the best application for creating worksheets with fill-in form fields?  The worksheets will be emailed to my clients for completion.  Once completed they need to be able to save them to their computer and/or email them back to me.  What application will they have to have in order to fill in and save the PDF?

    In short, you will need Acrobat to create the forms. They only need the free Reader to fill them in and save them.

  • Create Documents with any Currency

    Hi,
    it´s possible create documents with SDK objects in any currency?
    I need create a invoice in Local Currency or System Currency depending the source.

    Hi Victor,
    Yes, you can create marketing documents through the DI API and set any currency code (...well, any currency code that already exists in the company setup). The Documents object has a DocCurrency and DocRate property for defining the currency.
    Kind Regards,
    Owen

  • I can't open my documents with the update.

    I can't open my documents with the update. It says to update pages in the app store but I've already done that, that how I got in this stupid mess. How do I fix it? When I go on the app store it doesnt say update, it says installed, but I still cant open my documments. I'm freaking out.

    Are you launching Pages from an icon in your Dock? Installing the update does not change the Dock icons & it does not remove the older versions. Go to your Applications folder & launch the new Pages from there.

  • Creating document with content from a remote system

    Any sample code that I have seen for creating a new document requires that the file (the content) of the document resides on the Server machine.
    What is the best way to create a document with content that comes from a remote file?

    The Java code which is trying to load a file into IFS must have access to the file to load it.
    If the file you are trying to load is in a remote location from the Java code, then you would need to use some remote access protocol, such as NFS, to ensure the file was accessible to the Java code.

  • Create document with PL/SQL xml parser

    Hello,
    I'm trying to create a document with PL/SQL package xmldom on 8.1.7 and write to a file.
    The problem is that my file is empty when it's created.
    Can anyone send me an example of this simple problem or fullfill my example so it's works.
    As you understand I'm new in using XML. :)
    My example is:
    declare
    doc xmldom.DOMDocument;
    n xmldom.DOMNode;
    e xmldom.domelement;
    t xmldom.domtext;
    begin
    doc := xmldom.newdomdocument;
    t := xmldom.createtextnode(doc, 'ROOT');
    n := xmldom.makenode(t);
    doc := xmldom.makedocument(n);
    xmldom.writetofile(doc, 'd:\orant\xdk\plsql\demo\test.xml');
    end;
    Regards
    Hekan

    Your problem may be memory for the JavaVM. Remember, the PL/SQL
    parser uses the Java XML Parser APIs which run in a VM instance.
    Are you running Oracle 8i? If you are you can access our Java
    XML parser loaded in 8i's VM directly from your PL/SQL code.
    That is in fact how our PL/SQL Parser does it.
    Finally, we have no experience loading other XML Parsers into
    Oracle.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Premal Mehta (guest) wrote:
    : Hi,
    : I asked about his a few days back. Pl/SQL parser does not
    work
    : for XML files of size greater then 500Kb. You replied saying
    : that there were no such problem.
    : However whenever I try, either I get some exception or
    Pl/SQL
    : crashes due to memory error. I am clueless. Is there some
    : setting that I can do to get away with the problem? Please
    : guide...
    : Also, tell me about the alternatives.
    : Can I write code in Java and load these class filesin Oracle
    : and then reference these classes from Pl/SQL code. Can I load
    : any other parser for Java in Oracle.
    : Looking forward for help...
    : Premal.
    null

  • Problem creating document with function ISH_N2_MEDICAL_DOCUMENT

    Hello,
    first of all, creating a document with correct data works. But our customer wants the documents also to be created if the name of the responsible employee is wrong or not existing.
    Can this be done in some way? Because when i try to use the function "ISH_N2_MEDICAL_DOCUMENT" i get the message "message employee NAME is not employee responsible" and the document is not created.
    regards
    Daniel

    Dear Daniel,
    basically you cannot create a medical document without an existing employee responsible (business partner). Depending on your system configuration the EmR may to be assigned to the documenting ou.
    So how you can deal with that restriction?
    a) use a dummy bp for these onces which doesn't exists. You can check BP by the IS-H BAPI for Business partners.
    b) create the BP on the fly before creating the document.
    Regards,
    Axel

  • Error while creating document with attachment.

    Hi,
    I am getting an error "An error occured while creating the original attribute for PDF"
    I tried with out file attachment, it works as you know it is simple....
    I tried with various types of attachments like .TXT and .WRD (changed both wsapplication and docfile parameters), however i get the same error. I tried both from presentation and application server (by providing   pf_ftp_dest                = 'SAPFTPA'    pf_http_dest               = 'SAPHTTPA' )
    Any idea on how to solve this?
    All i need is create a DMS document with a PDF attachment from application server. Are there any other ways to solve this issue?
    ws_docdata-documenttype = 'ARE'.
    ws_docdata-description = 'BAPI DMS'.
    ws_docdata-statusextern = 'CR'.
    ws_file-storagecategory = 'DMS_C1_ST'.
    ws_file-wsapplication   = 'PDF'.
    ws_file-description = 'Job output'.
    ws_file-docfile = 'C:\CAD Integ BAPIS_46.pdf'.
    append ws_file to it_files.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
      EXPORTING
         documentdata               = ws_docdata
    IMPORTING
         return                     = v_ret
    TABLES
         documentfiles              = it_files   .
    BREAK-POINT.
    IF v_ret-type CA 'EA'.
      ROLLBACK WORK.
      WRITE : v_Ret-message.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = '5'.
    ENDIF.
    Thanks
    Pavan

    Hi,
    I found that it is due to document type = 'ARE'. I changed hte document type to one of hte standard type 'TST'. It works for presentation server, but does not work for application server. Any ideas? Any help is appreciated with points.
    ws_docdata-documenttype = 'TST'.
    ws_docdata-description = 'BAPI DMS'.
    ws_docdata-statusextern = 'CT'.
    ws_docdata-documentnumber = 'ZNG-10000000017'.
    ws_file-storagecategory = 'DMS_C1_ST'.
    ws_file-wsapplication   = 'PDF'.
    ws_file-description = 'Job output'.
    ws_file-docfile = p_file.
    append ws_file to it_files.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
      EXPORTING
        documentdata               = ws_docdata
       pf_ftp_dest                = 'SAPFTPA'
       pf_http_dest               = 'SAPHTTPA'
    IMPORTING
       documentnumber             = v_docnum
       documentpart               = v_docpart
       documentversion            = v_docver
       return                     = v_ret
    TABLES
       documentfiles              = it_files   .
    IF v_ret-type CA 'EA'.
      ROLLBACK WORK.
      WRITE : v_Ret-message.
    ELSE.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = '5'.
    ENDIF.
    Thanks
    Pavan

  • Am creating document with Pages. pages are in "portrait" orientation, but two charts at end need to be "landscape". changing the orientation for one section changes it for entire doc. can i have different orientations in Pages for different sections?

    am creating a document with Pages.  all pages using "portrait" orientation, except 2 appendices need to be in "landscape".  in Word for Windows it is possible to have different page orientations for different sections of a document.  is that possible with Pages.  Even when i put the appendices in a different section, changing the page orientation changes it for the entire doc.

    Make a separate document the size and orientation you want.
    Turn that into a pdf and add it back into the original Pages document or into the pdf from from that document.
    Peter

  • Reg Creating Document with predefined content and it should be send by mail

    Hello Friends,
    I created one report containg Customer Realted Info.
    Requirement:
    now when user click or select one customer no then that time one document will be generated with predifined format having that selected customer no and address
    and that document will be sent by mail to 4 persons. ( like automailers ).
    so plz tell how to create that document with predefined letter content and how can i send that document via mail ????
    Thanks in advance.
    Marmik

    Hi
    <b>Here is custom sample code for E-mail purpose</b>
    *& Report  ZSEND
    report zsend .
    tables: kna1.
    data for send function
    data doc_data  like sodocchgi1.
    data object_id like soodk.
    data objcont   like soli occurs 10 with header line.
    data receiver  like somlreci1 occurs 1 with header line.
    select * from kna1 where anred like 'C%'.
      write:/ kna1-kunnr, kna1-anred.
    send data internal table
      concatenate kna1-kunnr kna1-anred
                             into objcont-line separated by space.
      append objcont.
    endselect.
    insert receiver (sap name)
      refresh receiver.
      clear receiver.
      move: sy-uname to  receiver-receiver,
            'X'      to receiver-express,
            'B'      to receiver-rec_type.
      append receiver.
    insert mail description
      write 'Sending a mail through abap'
                     to doc_data-obj_descr.
    call function 'SO_NEW_DOCUMENT_SEND_API1'
         exporting
              document_data              = doc_data
         importing
              new_object_id              = object_id
         tables
              object_content             = objcont
              receivers                  = receiver
         exceptions
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
              parameter_error            = 5
              x_error                    = 6
              enqueue_error              = 7
              others                     = 8.
    Hope this will help.
    Please rewards suitable points.
    Regards
    - Atul

  • CV01N - create document with template - path length

    Hi all,
    i want to create a document from a template document with an original file.
    A popup is displayed and i specify the new path for the new original file.
    --> Error when copying from ... <directory>
    Only 50 characters of the directory string are displayed in the message box???
    Any ideas?
    regards

    hi,
    go to trasaction dc30
    If you are using word file, then select it and click on define template for original file. Make new entry, define all things
    like  Document Type
    Applic.
    Language
    No
    Description
    Copy from...............
    this way you can maintan the template for original file.
    create new document, cleck on create original.
    once you click it, there is a button create with template.
    in dc20 ,click Define data carrier type "server, front end".
    if you are not using content server , then say default entry.
    regards
    nitin
    Award point if useful.

  • Problem with prepared statement where cluase when passing string value.Help

    I am updating a table using the following code. I am using string parameter in where clause. if I use Long parameter in where clause with ps.setLong , this code is working. Is there any special way to pass string value? Am I doing anything wrong?
    ===================
    updateMPSQL.append("UPDATE MP_Table SET ");
         updateMPSQL.append("MPRqmt = ?,End_Dt = ? ");
              updateMPSQL.append("where POS = ? ");
              System.out.println(updateMPSQL.toString());
              con     = getConnection(false) ;
              ps      = con.prepareStatement(updateMPSQL.toString());
              ps.setLong(1,MPB.getMPRqmt());
              ps.setDate(2,MPB.getEnd_Dt());
              ps.setString(3,MPB.getPos());
    result = ps.execute();
              System.out.println("Result : " + result);
    ==========
    Please help me.
    Thanks in advance.
    Regards,
    Sekhar

    doesn't Pos look like a number rather than a string variable?
    if I use Long
    parameter in where clause with ps.setLong , this code
    is working.
    updateMPSQL.append("where POS = ? ");
    ps.setString(3,MPB.getPos());

  • I need help creating documents with framemaker 9

    I have been using Words for all the manuals that i have created and i need to transfer them into framemaker and then be able to rewrite them directly into framemaker. I need some help with that please

    Anna,
    You might want to have a peak at some of these tutorials and papers:
    http://www.adobe.com/devnet/framemaker/articles/word_conversion.html
    http://www.techknowledgecorp.com/public/word2frame.pdf
    http://www.io.com/~tcm/etwr2472/guides/frame/frame6/frame_conversion6.html
    http://www.ivanwalsh.com/2009/10/how-to-convert-microsoft-word-documents-into-adobe-framem aker/
    There's also an online webinar [nominal fee] coming up on Feb.10th presented by Shlomo Perets that will be covering this topic. [Highly recommend]
    See: http://www.microtype.com/training.html#ImproveFM

  • Creating documents with SCMS_DOC_URL_CREATE in SAP Content Server

    Hi there,
    I have a Problem here  with the Knowledge Provider concerning SCMS_DOC_URL_CREATE and hope anyone could help me out.
    For a SAP Records Management document I am calling BAPI_SRM_DOC_CREATE and get a LOIO and a PHIO ID for my new document. The PHIO-ID I pass to SCMS_DOC_URL_CREATE which then creates the URL to put the file on a SAP Content Server with a 3rd party tool. That works totally fine and I can see the file on the Content Server with its metadata,
    Unfortunately SAP Records Management doesn't recognize that a file has been uploaded. When I open the file in the transaction ORGANIZER it has no content and no components.
    Is there any function call I am missing to tell the Records Management document that I have uploaded something?
    All is working fine when I get the uploaded content into NetWeaver with SCMS_GET... and call BAPI_SRM_CHECKIN_DOCUMENT. But of course this is not what I want (transferring the file directly in the local network area where the content server stands, then getting it back to NetWeaver and back again to the content server).
    Any help would really be appreciated.
    Thank you
    Marcus

    Answer: because SCMS_DOC_URL_CREATE is not remote enabled by default.

Maybe you are looking for

  • Refresh problem in CL_GUI_ALV_TREE

    Hi Experts, I am taking an object name as input and based on the input value, fetching data from the table and displaying it in the form of a tree, using the class CL_GUI_ALV_TREE. The outtab is passed empty to the set_table_for_first_display method.

  • InDesign server export .pdf, AND save .indd

    Hey all, Just a quick question. Is it possible to script InDesign server to export a .pdf to a certain folder location AND save the original .indd file to another folder location all automatically? Cheers, Steve.

  • Self-Monitoring solman SP16 error

    Hi gurus, I need your help with Solution Manager Diagnostic configuration. I installed Solution Mananger 7.0 SP16 with Willy Introscope 7.2 and SMD in solution Manager. When I run the wizard for Diagnostics Setup --> Managed Systems --> Managed Syste

  • I'm having trouble using a photo album as my desktop.  I followed everything in the HELP section, didn't work.

    I'm new to the MAC.  I'm trying to share a photo album to use as my screensaver/desktop.  I followed the directions given in the HELP section (go to the photo album, check SHARE,  then select "desktop" )but it didn't work. Any ideas?

  • Is this a good sign?

    Hello! So I´ve ordered a Mac Pro quite recently and was told it was about to arrive tomorrow and was now in Germany on the way to Sweden, but according to Apple Store it´s been scheduled to monday next week. All of a sudden, the delivery date of UPS