DMEE: name of node in SAPscript form

Hi,
i´m using the DMEE for creating an outgoing XML-File with the Formatree SEPA_CT. For a Node you can define in the Formattree by your own a SAPscript name.
I create a form Accompanying Letter for the XML-File with SAPscript. In SAPscript i have full access to the Structure FPAYP, etc. That still works, but i have no acces to the define SAPscript name in the Formattree.
Anbody an idea, how i can get access to the variable? special command is need in sapscript? or is there a new structure? Has anybody experience with geeting access to the variable? Thanks for Answers.

solved

Similar Messages

  • I Require standard names for Sapscript form

    hai to all ,
    would any body help me in finding the standard sapscripts forms names and their correponding standard print programs for the following topics;
    1. RFQ
    2. QUOTATION
    3. CONTRACT
    4. CUSTOMER STATEMENT
    5. FI-INVOICE
    6. FI-CREDIT MEMO
    7. DUNNING LETTER
    8. ACCOUNTS PAYABLE CHECKS
    Correct answers will be appreciated.
    thank you ,
    rajesh kumar.

    Hi Rajesh,
       Go to Nace transaction.Choose your application.For Example RFQ application EF and for Sales Application V1 , Billing V3. After selecting go to the output types and from there Processing routines.
       U can also search using tables.for sd and mm related scripts u can find in table TNAPR and for finace related script programs and layouts u can find in table t001f.
    If this helps u reward me points.
    Regards,
    vijay.

  • Ship to Party address is missing country name in SAPScript FORM

    Hi All,
    i had modified the form for displaying the address of the Ship - to - party address, but the country name is missing in the FORM output, can any body suggest a solution for this..
    here is the code that i had written...
    FORM get_addr TABLES intab TYPE t_intab
                  out_tab TYPE t_outtab.
      DATA : wa_intab LIKE itcsy,
             w_outtab LIKE itcsy.
      DATA v_adrnr_we TYPE adrc-addrnumber.
      READ TABLE intab INTO wa_intab INDEX 1.
      v_adrnr_we = wa_intab-value.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = v_adrnr_we
        IMPORTING
          output = v_adrnr_we.
      SELECT SINGLE * FROM adrc WHERE addrnumber = v_adrnr_we.
      READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_NAME1'.
      IF sy-subrc EQ 0.
        w_outtab-value = adrc-name1.
        MODIFY out_tab FROM w_outtab INDEX sy-tabix.
      ENDIF.
      READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_NAME2'.
      IF sy-subrc EQ 0.
        w_outtab-value = adrc-name2.
        MODIFY out_tab FROM w_outtab INDEX sy-tabix.
      ENDIF.
      READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_NAME3'.
      IF sy-subrc EQ 0.
        w_outtab-value = adrc-name3.
        MODIFY out_tab FROM w_outtab INDEX sy-tabix.
      ENDIF.
      READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_NAME4'.
      IF sy-subrc EQ 0.
        w_outtab-value = adrc-name4.
        MODIFY out_tab FROM w_outtab INDEX sy-tabix.
      ENDIF.
      READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_STREET'.
      IF sy-subrc EQ 0.
        w_outtab-value = adrc-street.
        MODIFY out_tab FROM w_outtab INDEX sy-tabix.
      ENDIF.
      READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_CITY1'.
      IF sy-subrc EQ 0.
        w_outtab-value = adrc-city1.
        MODIFY out_tab FROM w_outtab INDEX sy-tabix.
      ENDIF.
      READ TABLE out_tab INTO w_outtab WITH KEY name = 'Z_CITY2'.
      IF sy-subrc EQ 0.
        w_outtab-value = adrc-city2.
        MODIFY out_tab FROM w_outtab INDEX sy-tabix.
      ENDIF.
      CLEAR adrc.
    ENDFORM.                    "GET_ADDR
    and in the form editor it was like this.....
    PERFORM GET_NAME IN PROGRAM ZSD_SDPACKLI
    USING &VBPLA-ADRNR_WE&
    CHANGING &Z_NAME1&
    CHANGING &Z_NAME2&
    CHANGING &Z_NAME3&
    CHANGING &Z_NAME4&
    CHANGING &Z_STREET&
    CHANGING &Z_CITY1&
    CHANGING &Z_CITY2&
    ENDPERFORM
    ADDRESS DELIVERY PARAGRAPH AS\
    NAME     &Z_NAME1&, &Z_NAME2&, &Z_NAME3&, &Z_NAME4&
    STREET   &Z_STREET&
    CITY     &Z_CITY1&, &Z_CITY2&
      POSTCODE &VBPLA-PSTLZ_WE&
      COUNTRY  &VBPLA-LAND1_WE&
      REGION   &VBPLA-REGIO_WE&
      FROMCOUNTRY &VBPLA-LAND1_VST&
    ENDADDRESS
    Thanks in advance..!

    Hi Abaper,
    In ADRC table,you will have a field by name COUNTRY.This holds the country key.
    Using this country key LAND1 in ADRC table,you will have to fetch the Country name from T005T table.The field in the T005T which holds the Country name is LANDX.
    You will have to write select querries for this.
    By using LANDX from T005T table ,you can display the country name.
    Regards,
    Kashyap Ivaturi

  • How to change the Development Class of the SAPSCRIPT FORM

    Hi All,
          I have transported the old form which needs to be deleted in Test System. Is that possible to create a TR for deletion and send it to Test enivronment?..
         Also is it possible to change the development class for a form?
         Please help me on this. Urgent!...
    Regards,
    Ramkumar.

    Yes, it is possible to change the development class for forms..
    Use SE03, transport organiser tools
    goto node OBJECT DIRECTORY ENTRY
    select node "Change object directory entries"
    Execute
    goto the next text box after data element, type FORM, give your SAPSCRIPT form name and tick the check box execute... now rightclick on your form and chenge development class..
    Now coming to your second question is is not possible to delete a FORM that it is already transported to QA and Production, only way to do this is by doing client copy.. basis will do it for you..
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • Linking PE51 Form and SAPScript Form

    I have found quite a few posts on this topic but I didn't find anything conclusive.
    We have an SAPScript form and a PE51 form. We run the Pre-program DME where we specify the PE51 form name. Then we run the DME program. But the form is not generated.
    I just wanted to understand the right method to link the PE51 form to the SAPScript form. I have read about 525-HR and REGUD-TXTHR. Can anyone please explain in detail what these are and how they help in linking the PE51 form and the SAPScript?
    Thanks and Regards,
    Vidya.

    I have really not found an answer to this one, but still closing it as need to post more questions!

  • SAPSCRIPT form - Text is not porperly displayed

    hi all,
    in my SAPSCRIPT form, I am getting a text from PERFORM stmt. in the PERFORM , the text is coming correct, but in the form , it is showing only half of the text.
    the code
    FORM get_text TABLES ts_intab STRUCTURE itcsy
                         ts_outtab STRUCTURE itcsy.
    DATA: l_haul_text(500) TYPE c,  
               l_haul_long(250) TYPE c.
    l_haul_long = l_haul_text+0(250).
        LOOP AT ts_outtab.
          CASE ts_outtab-name.
            WHEN 'L_HAUL_LONG'.
              ts_outtab-value = l_haul_long.
              MODIFY ts_outtab.
          ENDCASE.
        ENDLOOP.
    Then in the form, just display
    /:  PERFORM GET_TEXT IN PROGRAM
    /:   USING &VBDKL-VBELN&
    /:   CHANGING &L_HAUL_LONG&
    /:  ENDPERFORM
    &L_HAUL_LONG&
    while debugging, the text is correct till TS_OUTTAB but when it comes to the form L_HAUL_LONG, it is truncated.......what should i do..
    Kindly help.
    THnaks

    answered

  • Addint new field to the standard sapscript form.

    FOR SALES INVOICE DOCUMENT FORM PRINTING
    TRANSACTION CODE: VF01
    OUTPUT TYPE : FJCI
    PROGRAM NAME: RVADAUS1
    SAPSCRIPT FORM NAME: SD_EXPORT_FJCI
    ENTRY ROUTINE: ENTRY_FJCI.
    STRUCTURE USED FOR THIS OUTPUT TYPE = V55EFJCI
    THE QUERY IS AS FOLLOWS:
    I WANT TO ADD DATA MODE OF TRANSPORT FROM THE INVOICE DOCUMENT. THE TABLE AND FIELD IS T618-BEZEI.
    SO I COPIED THE STANDARD FORM TO ZSD_EXPORT_FJCI AND THE STANDARD PROGRAM TO ZRVADAUS1.
    I SUCCESSFULLY FETCHED THAT FIELD DATA.
    I APPEND THE STRUCTURE 'ZAV55EFJCI' TO ADD THE ADDITIONAL T618-BEZEI FIELD.
    AND WRITE MY SELECT QUERY IN THE ENTRY_FJCI FORM ROUTINE.
    THE CODE IS AS FOLLOWS:
    data: begin of it_mode_of_tp occurs 1,
          bezei type t618t-bezei,
          end of it_mode_of_tp.
    select a~bezei as zzbezei into table it_mode_of_tp from t618t as a
    inner join
    eikp as b on aexpvz = bexpvz and aland1 = baland inner join vbrk as
    c on bexnum = cexnum
    where cvbeln = nast-objky and aspras = nast-spras .
    loop at it_mode_of_tp.
       v55efjci-zzbezei = it_mode_of_tp-bezei.
    endloop.
    BUT THE DATA FOR THAT IS NOT GETTING DISPLAYED.
    THIS WAS THE FIRST METHOD I FOLLOWD.
    THE SECOND METHOD I DID WAS AS FOLLOWS:
    FORM ENTRY_FJCI.
         PERFORM PROCESSING.
    ENDFORM
    FORM PROCESSING.
         PERFORM PRINT_DOCUMENT.
    ENDFORM.
    FORM PRINT_DOCUMENT.
           CALL FUNCTION 'RV_EXPORT_DOCUMENT_PRINT'
    ENDFORM.
    IN THIS FUNCTION THE DATA IS GETTING FETCHED FROM THE DATABASE TABLES AND STORED IN THE STRUCURE V55EFJCI.
    SO I COPIED THAT FUNCTION.
    IN THIS FUNCTION , THEIR IS A INCLUDE PROGRAM 'LV55EF11' FOR FETCHING DATA FOR ENTRY_FJCI FORM ROUTINE.
    I COPIED THAT PROGRAM CODE , AND CREATED MY OWN INCLUDE PROGRAM (WHICH I AM STORING IT IN ANOTHER Z PACKAGE.)
    AND WRITTEN MY ABOVE CODE IN THAT PROGRAM. BUT WHEN I DO THIS, NOITHING GETS DISPLAYED , EVEN THE PREVIOUSLY COMING DATA ALSO NOT GETTING DISPLAYED.
    HOW SHOULD I PROCEED.

    you said you copied layout(form) SD_EXPORT_FJCI to ZSD_EXPORT_FJCI,
    you updated program to fetch datat & populate v55efjci-zzbezei field.
    Now
    - you need to modify layout(form) ZSD_EXPORT_FJCI via SE71 to insert your field in one of the windows where it has to be printed (sap script knowledge is required here).
    - you need to either modify SAP output type FJCI to use your program/layout(form) or you need to create your own output type and assign your form/program to it, and in addition to that if you define your own output type - yo have to add it to output determination procedure, to access sequences, add condition records to condition table... so it's picked up by the invoice.

  • Call a function module from within a sapscript form

    not being an ABAPer i have the task of changing the Invoice SAPScript form.
    i have made the necessary changes - just about... but they have asked that i include the VAT Number on the Invoice....
    not too bad apart from different company codes have different vat numbers...
    not knowing a better way to retrieve data from table V_001_B - i am using the print program -RFKORD50, is there a better way of getting the VAT Number by company code? I figured if i could call the FM to return the value, all well and good.., they do not want the print program changed if possible so was looking at alternate methods....
    or am i trying to reinvent the wheel here?

    thank you both!  helpful answers! :o)
    anyway! 
    i have written the program which is called from the SAPScript:
        /:       PERFORM GET_VATNUMBER IN PROGRAM ZFI_F140_OPERATIONS
        /:       USING &BKPF-BUKRS&
        /:       CHANGING &VATNUMBER&
        CE       VAT Registration No : &VATNUMBER&
        REPORT zfi_f140_operations.
        FORM get_vatnumber TABLES in_par  STRUCTURE itcsy
                                  out_par STRUCTURE itcsy.
          DATA: lv_co_code TYPE bukrs,
                lv_vat_no  TYPE stceg.
          READ TABLE in_par WITH KEY name = 'BKPF-BUKRS'.
          MOVE in_par-value TO lv_co_code.
          SELECT SINGLE stceg FROM t001
            INTO lv_vat_no WHERE bukrs = lv_co_code.
          out_par-name = 'VATNUMBER'.
          WRITE lv_vat_no TO out_par-value.
          CONDENSE out_par-value.
          MODIFY out_par INDEX 1.
        ENDFORM.              
    it is not working and i cannot work out why... 
    i have not been ABAPing for very long but have had a go.... 
    any thoughts as to what i have done wrong?
    or point me where i should be looking?  thank you!

  • Missing text elements in my sapscript form / Transaction F.17

    Hello!
    I'm on a sap ecc 6.0 system and have problems with a sapscript form.
    My printprogram is sapf130d and my form is y_..._debi_slep.
    Starting the transaction F.17 i get several lists and at last the error-list. This error-list says "in form y_..._debi_slep in the main window the following textelements are missing ...". Three elements 506, 595 and 606 are missing.
    When i look into the form i couldn't see the elements. So with "/E 506", "/E 595" and "/E 606" i've inserted the elements in the main window and saved and activated the form. A new try with "F.17" raises the same errors. For my understanding the relevant elements should be in the info window in this case - i inserted them there, too ... but the errors remain the same. In the print program i can find all these textelements.
    Perhaps someone out there has a solution or a hint for me?
    Thanks a lot in advance.
    Best regards,
    Ingo

    The cause of error could be of any reason.
    1) For driver program SAPF130D, following forms must be used, or customised by copying any of this below forms.. May be this could be one <b>reasons for the error.</b>
    Forms
    The following forms are used in the standard SAP R/3 System:
    Form for  Form name
    Letter and Reply  <b>F130_CONFIRM_01</b>
    Check list  <b>F130_LIST_01 and F130_LIST_02</b>
    Results table  <b>F130_RESULT_01 or F130_RESULT_02</b>
    Error list  <b>F130_ERROR_01 or F130_ERROR_02</b>
    If you define your own forms, the form name should contain the identification code "F130".
    Regards,
    Sairam

  • In which table the lines of the SAPScript form text elements are found?

    Hello,
    I want to write a report analyzing the lines contained in the text elements of an SAPScript form. From which table can I select the data? Regards.
    Lars.

    Sorry.. forgot to mention the FM name.
    You can use FM 'READ_TEXT'.
    pass 'ST' for ID.
    and 'TEXT' for OBJECT
    and pass the name of text element to NAME u will get the
    text element.

  • Include PDF file in a SAPscript Form

    Here is a good one.  Anyone ever heard of this.  I need to somehow import a PDF file into an ABAP program and include it in a sapscript form. 
    Requirment:
    Customer sends a PDF file to our system. We need to take this PDF file and include into a "quote" sapscript form and fax it back to the customer.
    If anyone has any other ideas of how I can accomplish this task........PLEASE let me know.  Thanks.
    Regards,
    Rich Heilman

    i solved a similiar problem by following:
    - catch the sapsript-data in otf-format by setting
      itcpo-tdgetotf = 'X' at CALL FUNCTION 'OPEN_FORM'
    - read the pdf-file from it's source
      (i.e. content server)in an internal table
    - send the fax with function-module SO_DOCUMENT_SEND_API1.
      at least in 4.6c you can add attachements to the fax.
      the fax-body is the otf, the attachements are
      the pdf-files.
    i suppose that your fax-software is able to send the pdf-attachements.
    here is some coding i copied from my program. i simplified it to show the main steps, so it won't run immediatly. the form assumes that the otf is filled in table ZT_OTFDATE, the pdf in ZT_PDFDATA and the PDF-filesize is in Z_PDFSIZE.
    *&      Form  FAX
    FORM fax CHANGING pe_subrc.
      DATA
      : ls_docdata TYPE sodocchgi1
      , ls_sadrfd  TYPE sadrfd
      , l_len TYPE i
      , lt_packlist TYPE TABLE OF sopcklsti1 WITH HEADER LINE
      , lt_head TYPE TABLE OF solisti1 WITH HEADER LINE
      , lt_text TYPE TABLE OF solisti1 WITH HEADER LINE
      , lt_bin  TYPE TABLE OF solisti1 WITH HEADER LINE
      , lt_recv TYPE TABLE OF somlreci1 WITH HEADER LINE
      , l_lines TYPE i
    OTF-Body
      CLEAR lt_packlist.
      DESCRIBE TABLE zt_otfdata LINES l_lines.
      lt_packlist-transf_bin = 'X'.
      lt_packlist-head_start = 1.
      lt_packlist-head_num   = 1.
      lt_packlist-doc_type   = 'OTF'.
      lt_packlist-obj_name   = 'Letter'.
      lt_packlist-obj_descr  = 'Letter'.
      lt_packlist-body_start = 1.
      lt_packlist-body_num   = l_lines.
      lt_packlist-doc_size   = lt_packlist-body_num * 255.
      APPEND lt_packlist.
      APPEND tnapr-fonam TO lt_head.
      APPEND LINES OF zt_otfdata TO lt_bin.
    Attachement
      CLEAR lt_packlist.
      lt_packlist-transf_bin = 'X'.
      lt_packlist-doc_type   = 'PDF'.
      lt_packlist-obj_name   = 'filename'.
      lt_packlist-obj_descr  = 'a filedescription'.
      lt_packlist-head_start = 2.
      lt_packlist-head_num   = 1.
      DESCRIBE TABLE lt_bin LINES l_lines.
      lt_packlist-body_start = l_lines + 1.
      DESCRIBE TABLE zt_PDFDATA LINES l_lines.
      lt_packlist-body_num   = l_lines.
      lt_packlist-doc_size   = Z_PDFSIZE.
      APPEND lt_packlist.
      APPEND 'filename' TO lt_head.
      APPEND LINES OF zt_pdfdata TO lt_bin.
    Receiver
      ls_sadrfd-rec_state = itcpo-tdteleland.
      ls_sadrfd-rec_fax   = itcpo-tdtelenum.
      lt_recv-receiver     = ls_sadrfd.
      lt_recv-rec_type     = 'F'.     " F=FAX U=Email
      APPEND lt_recv.
    DOCUMENT HEADER
      CLEAR ls_docdata.
      ls_docdata-obj_name    = 'fax name'
      ls_docdata-obj_descr   = 'fax description'.
      ls_docdata-obj_langu   = sy-langu.
      ls_docdata-obj_sort    = sy-datum.
      ls_docdata-obj_expdat  = sy-datum + 7.
      ls_docdata-sensitivty  = 'O'.
      ls_docdata-obj_prio    = '1'.
    ls_docdata-NO_CHANGE   = ''.
      ls_docdata-priority    = ls_docdata-obj_prio.
      ls_docdata-expiry_dat  = ls_docdata-obj_expdat.
    ls_docdata-PROC_TYPE   = ''.
    ls_docdata-PROC_NAME   = ''.
    ls_docdata-PROC_SYST   = ''.
    ls_docdata-PROC_CLINT  = ''.
    ls_docdata-SKIP_SCREN  = ''.
    ls_docdata-TO_DO_OUT   = ''.
    ls_docdata-FREE_DEL    = ''.
      ls_docdata-doc_size    = l_len.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data                    = ls_docdata
        PUT_IN_OUTBOX                    = ' '
        SENDER_ADDRESS                   = SY-UNAME
        SENDER_ADDRESS_TYPE              = 'B'
      IMPORTING
        SENT_TO_ALL                      =
        NEW_OBJECT_ID                    =
        SENDER_ID                        =
        TABLES
          packing_list                     = lt_packlist
          object_header                    = lt_head
          contents_bin                     = lt_bin
          contents_txt                     = lt_text
        CONTENTS_HEX                     =
        OBJECT_PARA                      =
        OBJECT_PARB                      =
          receivers                        = lt_recv
        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
      IF sy-subrc <> 0.
        pe_subrc = sy-subrc.
        PERFORM protocol_update.
      ENDIF.
    ENDFORM.

  • Sapscript form printing

    i am having a problem with a sapscript form for payment advice. its in germany but i want it in english. how do i convert it to english. the name of the form is F110_D_DTA. Its a standard form. if there is anyone who has this form in english please send it to my email: [email protected]

    Hi Chingarande,
    You can also try this.
    GO to SE71->Administrative Data. In language Attributes change the option "Translate to all languages" from "Do not ranslate".
    Ashven

  • How Sapscript form can be send by mail

    Hello all,
    I want to send a Sapscript form by mail.
    I think it should first be converted to PDF form and than need to be send by mail.
    I have created a z form which is a copy of standard for medruck and also have changed the standard program SAPFM06P. So I need to add functionality in z program so that i can send the sapscript form by mail.
    Can any body let me know the complete process how can i do it?
    Thanks

    Hi,
    Just follow the below code . I am giving the code which starts from OPEN_FORM. After that one submit program is there u can see the code.
    *&      Form  display_layout
          text
    -->  p1        text
    <--  p2        text
    FORM display_layout.
      CALL FUNCTION 'OPEN_FORM'
       EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
         device                            = 'PRINTER'
      DIALOG                            = 'X'
         form                              = 'YFIL_DUNN_01'
      LANGUAGE                          = SY-LANGU
       options                           = itcpo
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
       EXCEPTIONS
         canceled                          = 1
         device                            = 2
         form                              = 3
         options                           = 4
         unclosed                          = 5
         mail_options                      = 6
         archive_error                     = 7
         invalid_fax_number                = 8
         more_params_needed_in_batch       = 9
         spool_error                       = 10
         OTHERS                            = 11
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT i_tab INTO wa_tab.
        CALL FUNCTION 'WRITE_FORM'
         EXPORTING
           element                     = '531'
      FUNCTION                       = 'SET'
      TYPE                           = 'BODY'
           window                      = 'MAIN'
    IMPORTING
       pending_lines                  = wa_tab.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDLOOP.
      CALL FUNCTION 'CLOSE_FORM'
       IMPORTING
         result                         = itcpp
        RDI_RESULT                     =
      TABLES
        OTFDATA                        =
         EXCEPTIONS
           unopened                       = 1
           bad_pageformat_for_print       = 2
           send_error                     = 3
           spool_error                    = 4
           OTHERS                         = 5.
      IF sy-subrc = 0.
        IF ( itcpp-userexit IS INITIAL AND
            NOT itcpp-tdspoolid IS INITIAL ).
          p_spool = itcpp-tdspoolid.
          SUBMIT yfir_mailsend_pdf_attachment WITH p_spool = p_spool
                                              WITH p_kunnr = p_kunnr.
        ENDIF.
      ENDIF.
    ENDFORM.                    " display_layout
    *&      Form  modify_duedate
          text
    -->  p1        text
    <--  p2        text
    FORM modify_duedate.
      SELECT SINGLE mat_rec_no
                    mat_rec_date FROM yfi_matno
                    INTO (v_mat_rec_no, v_mat_rec_date)
                    WHERE vbeln = wa_tab-vbeln.
      CHECK sy-subrc EQ 0.
      SELECT SINGLE zterm
                    FROM vbrk INTO  v_zterm
                    WHERE vbeln EQ wa_tab-vbeln.
      CHECK sy-subrc EQ 0.
      SELECT SINGLE zdays
                    FROM yfi_payment INTO v_zdays
                    WHERE zterm EQ v_zterm.
      IF sy-subrc EQ 0.
        wa_tab-zfbdt_due = ( v_mat_rec_date + v_zdays ).
        wa_tab-due_days = ( sy-datum - wa_tab-zfbdt_due ).
       IF wa_tab-due_days LE 0.
         wa_tab-due_days = 'N/A'.
       ENDIF.
        IF ( wa_tab-umskz = 'A' AND wa_tab-shkzg = 'H' ).
          wa_tab-zfbdt = ' '.
          wa_tab-zfbdt_due = ''.
          wa_tab-due_days = ''.
        ENDIF.
        MODIFY i_tab FROM wa_tab INDEX sy-tabix.
        CLEAR: v_mat_rec_no, v_mat_rec_date, v_zterm, v_zdays.
      ENDIF.
    ENDFORM.                    " modify_duedate
    SUBMIT PROGRAM :
    REPORT yfir_mailsend_pdf_attachment MESSAGE-ID yf.
    *& Program Name   : *
    & Author         :
    *& Creation Date  : *
    *& Program Type   :                                                   *
    *& SAP Release    : *
    *& Description    :     *
    *& Transport No   :                                                   *
    *& Transaction    :                                                   *
    *&  Send document with OTF/ALI attachment from spool to externalreci-
    *&  pient. OTF/ALI document is converted to PDF/HTML format duringthe
    *&  SAPconnect send process.
    *&  This report serves as example documentation for the function
    *&  modules SO_NEW_DOCUMENT_ATT_SEND_API1 and SO_DOCUMENT_SEND_API1.
    *&  Following this example you should be able to develop your own
    *&  report to send documents with all kinds of attachments.
    Creation of the entry for the compressed document
    *& TABLES:
    TABLES : kna1,
            adr6.
    *& INTERNAL TABLES:
    ***********PDF Declaration*******
    DATA: BEGIN OF i_spool OCCURS 0,
            rqident  LIKE tsp01-rqident,
            rqo1name LIKE tsp01-rqo1name,
            rqclient LIKE tsp01-rqclient,
          END   OF i_spool.
    *& VARIABLES :
    DATA: client LIKE tst01-dclient,
          name LIKE tst01-dname,
          objtype LIKE rststype-type,
          type LIKE rststype-type.
    DATA: spoolno LIKE tsp01-rqident,
         download TYPE c VALUE 'X', "AS CHECKBOX DEFAULT 'X',
         p_file LIKE rlgrap-filename
                         VALUE 'C:\Invoice.pdf',               "#EC NOTEXT
          otf LIKE itcoo OCCURS 100 WITH HEADER LINE,
         cancel,
          pdf LIKE tline OCCURS 100 WITH HEADER LINE,
          doctab LIKE docs OCCURS 1 WITH HEADER LINE,
          numbytes TYPE i,
          arc_idx LIKE toa_dara,
          pdfspoolid LIKE tsp01-rqident,
          jobname LIKE tbtcjob-jobname,
          jobcount LIKE tbtcjob-jobcount,
          is_otf.
    Data Declaration
    DATA: docdata    LIKE sodocchgi1,
          objpack    LIKE sopcklsti1 OCCURS  1 WITH HEADER LINE,
          objhead    LIKE solisti1   OCCURS  1 WITH HEADER LINE,
          objtxt     LIKE solisti1   OCCURS 10 WITH HEADER LINE,
          objbin     LIKE solisti1   OCCURS 10 WITH HEADER LINE,
          objhex     LIKE solix      OCCURS 10 WITH HEADER LINE,
          reclist    LIKE somlreci1  OCCURS  1 WITH HEADER LINE.
    *objpack-head_start = 1.
    *objbin = '  |  '. APPEND objbin.
    *DATA: listobject LIKE abaplist   OCCURS  1 WITH HEADER LINE.
    DATA: tab_lines  TYPE i,
          doc_size   TYPE i,
          att_type   LIKE soodk-objtp.
    objpack-head_start = 1.
    *& PARAMETERS:
    PARAMETERS : p_spool LIKE tsp01-rqident NO-DISPLAY,
                 p_kunnr LIKE kna1-kunnr NO-DISPLAY.
    *& M A I N   P R O C E S S
    *& START OF SELECTION.
    START-OF-SELECTION.
      SELECT SINGLE
      adr6~addrnumber
      adr6~smtp_addr
      FROM adr6
      INNER JOIN kna1
      ON kna1~adrnr = adr6~addrnumber
      INTO CORRESPONDING FIELDS OF adr6
      WHERE kna1~kunnr = p_kunnr.
      IF sy-subrc = 0.
    Create receiver list
        reclist-receiver = adr6-smtp_addr. "<-- customer address
        reclist-rec_type = 'U'.
        APPEND reclist.
      ENDIF.
    ***Convert Spool request to PDF
      PERFORM pdf_convert.
      docdata-obj_name  = 'MAIL_AEIW'.
      docdata-obj_descr = 'Dunning'.
      Main Text
      objtxt = 'Hi,'.
      APPEND objtxt.
      objtxt = 'Dunning'.
      APPEND objtxt.
      objtxt = 'Regards'.
      APPEND objtxt.
      Write Packing List (Main)
      DESCRIBE TABLE objtxt LINES tab_lines.
      READ     TABLE objtxt INDEX tab_lines.
      docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
      CLEAR objpack-transf_bin.
      objpack-head_start = 1.
      objpack-head_num   = 0.
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
      objpack-doc_type   = 'RAW'.
      APPEND objpack.
    Create Message Attachment
      Write Packing List (Attachment)
      att_type = 'PDF'.
      DESCRIBE TABLE objbin LINES tab_lines.
      READ     TABLE objbin INDEX tab_lines.
    *objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
      objpack-doc_size = tab_lines * 255.
      objpack-transf_bin = 'X'.
      objpack-head_start = 1.
      objpack-head_num   = 1.
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
      objpack-doc_type   = att_type.
      objpack-obj_name   = 'ATTACHMENT'.
      objpack-obj_descr  = 'Attached Document'.
      APPEND objpack.
    *check for not maintaining customer address
      IF reclist IS INITIAL.
        MESSAGE e000 WITH 'Please Maintain Customer e-Mail ID'.
        LEAVE LIST-PROCESSING.
      ELSE.
    Send Message
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data                     = docdata
             put_in_outbox                     = 'X'
        commit_work                       = 'X'     "used from rel.6.10
      IMPORTING
        SENT_TO_ALL                        =
        NEW_OBJECT_ID                     =
          TABLES
            packing_list                      = objpack
            object_header                     = objhead
            contents_bin                      = objbin
            contents_txt                      = objtxt
        CONTENTS_HEX                      = objhex
        OBJECT_PARA                        =
        OBJECT_PARB                        =
            receivers                         = reclist
      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
        IF sy-subrc <> 0.
          MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
                  WITH docdata-obj_name.
        ELSE.
          WRITE 'Mail sent successfully'.
        ENDIF.
      ENDIF.
      WRITE: / 'End of Program'.
    *&      Form  pdf_convert
          text
    -->  p1        text
    <--  p2        text
    FORM pdf_convert.
      DATA: date1   LIKE sy-datum,
            time1   LIKE sy-uzeit,
            period1 LIKE tsp01-rqcretime.
      date1 = sy-datum.
      time1 = sy-uzeit.
      date1 = date1 - 1.
      CONCATENATE date1 time1 INTO period1.
      SELECT rqident
             rqo1name
             rqclient FROM tsp01 INTO TABLE i_spool
                            WHERE rqowner   = sy-uname AND
                                  rqclient  = sy-mandt AND
                                  rqident   = p_spool.
      IF sy-subrc <> 0.
        WRITE: / 'No Spool Request created today'(003)
                COLOR COL_NEGATIVE.
        EXIT.
      ENDIF.
      SORT i_spool DESCENDING BY rqident.
      READ TABLE i_spool INDEX 1.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
             EXPORTING
                authority     = 'SP01'
                client        = i_spool-rqclient
                name          = i_spool-rqo1name
                part          = 1
             IMPORTING
              CHARCO        =
              CREATER       =
              CREDATE       =
              DELDATE       =
              MAX_CREDATE   =
              MAX_DELDATE   =
              NON_UNIQ      =
              NOOF_PARTS    =
              RECTYP        =
              SIZE          =
              STOTYP        =
                  type          = type
                  objtype       = objtype
             EXCEPTIONS
                  fb_error      = 1
                  fb_rsts_other = 2
                  no_object     = 3
                  no_permission = 4.
      CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid                    = i_spool-rqident
            no_dialog                      = ' '
          DST_DEVICE                     =
          PDF_DESTINATION                =
          IMPORTING
            pdf_bytecount                  = numbytes
            pdf_spoolid                    = pdfspoolid
          OTF_PAGECOUNT                  =
            btc_jobname                    = jobname
            btc_jobcount                   = jobcount
          TABLES
            pdf                            = pdf
          EXCEPTIONS
            err_no_otf_spooljob            = 1
            err_no_spooljob                = 2
            err_no_permission              = 3
            err_conv_not_possible          = 4
            err_bad_dstdevice              = 5
            user_cancelled                 = 6
            err_spoolerror                 = 7
            err_temseerror                 = 8
            err_btcjob_open_failed         = 9
            err_btcjob_submit_failed       = 10
            err_btcjob_close_failed        = 11.
      CASE sy-subrc.
        WHEN 0.
        WHEN 1.
          WRITE: / 'Error On Spool Job'(002)
                COLOR COL_NEGATIVE.
          EXIT.
        WHEN 2.
          WRITE: / 'No Permission'(003)
                COLOR COL_NEGATIVE.
          EXIT.
        WHEN 3.
          WRITE: / 'Conversion Not Possible'(004)
                COLOR COL_NEGATIVE.
          EXIT.
        WHEN OTHERS.
          WRITE: / 'Incorrect Destination Device'(005)
                    COLOR COL_NEGATIVE.
          EXIT.
      ENDCASE.
      CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
           EXPORTING
                line_width_src              = 134
                line_width_dst              = 255
           TABLES
                content_in                  = pdf
                content_out                 = objbin
           EXCEPTIONS
                err_line_width_src_too_long = 1
                err_line_width_dst_too_long = 2
                err_conv_failed             = 3
                OTHERS                      = 4.
    ENDFORM.                    " pdf_convert

  • Sapscript form print as PDF

    Hello,
    is there a way to setup a printer that we can print sapscript form into a PDF file?
    We don't want to go over the spool request and use RSTXPDFT4.
    I have already setup a printer with device type PDF1, Host Spool Access Method F:Printing on Frontend Computer and Host Printer __Default. But for some reasons it doesn't work. We are running SAP Enterprise 470.
    Any help?
    Thanks
    Anne

    You must choose a FILE printer. See these notes:
    [Note 576973 - Creating a file printer on a Windows PC|http://service.sap.com/sap/support/notes/576973]: steps to add a Windows (if it's Vista, see note 1164132) printer of type Generic/Text only, and to create an output device in SAP to print to this printer. It does not explain that we may just change the port of an existing printer.
    [Note 1164132 - Front-end printing on Windows printer with FILE port|http://service.sap.com/sap/support/notes/1164132]: note 576973 applied to Windows XP and before, but it doesn't work anymore on Windows VISTA because the dialog box to enter the file name is no more displayed. A change in SAPGUI 7.10 was made (and it works only with access method G) to display a SAP dialog box to enter file name.

  • How to do calculation to a variable in Sapscript form

    Hi experts,
    My question looks simple but I failed to solve it. Supposed in the Sapscript form there are two variables: &it_tab-qty1&, &it_tab-qty2&. I need to add the first variable's value to the second one, I tried as below in Sapscript form editor:
    /: &it_tab-qty2& = &it_tab-qty2& + &it_tab-qty1&
    But it doesn't work. Could you please tell me the syntax to do such calculation in Sapscript? I cannot modify the print program so I have to modify the Sapscript form instead.
    Thanks a lot.
    Yu

    Yes, you need to write an external program using SE38 to perform the calculation.
    The syntax in SAPscript:
    /* all the var define in the SAPscript is char string type
    /: define &v1& = &it_tab-qty1&
    /: define &v2& = &it_tab-qty2&
    /: define &v3& = ''
    /* GET_COMPNAME is the form name & Z001 is the program name
    /: PERFORM GET_COMPNAME IN PROGRAM Z001
    /: USING &v1&
    /: USING &v2&
    /: CHANGING &v3&
    /: ENDPERFORM.
    The syntax in program Z001 (Created by SE38):
    REPORT ZFIR001.
    FORM GET_COMPNAME tables in_tab structure itcsy
                                                     out_tab structure itcsy.
      data : p_1 TYPE CHAR80,
               p_1 TYPE CHAR80,
               p_3 TYPE CHAR80.
      retrieve data from the SAPscript
        READ table in_tab index 1.
        MOVE in_tab-value to p_1.
        READ table in_tab index 2.
        MOVE in_tab-value to p_1.
      Write the code to convert p_1 & p_2 to numeric and perform the addition to p_3
      After that convert the p_3 to char.
      send data back to the SAPscript
        read table out_tab index 1.
        move p_3 to out_tab-value.
        modify out_tab index sy-tabix.
    ENDFORM.

Maybe you are looking for

  • Netweaver Java Edition SP16 installation hangs on MS Windows Server 2003

    Hi! - Downloaded the 4 files of netweaver java edition sp16 - Extracted them in one folder on HDD - Executed installer (sapinst.exe) from local SAP web site beginning with start.html - Chose weak crypto level, local installation, no mirror log volume

  • How do I find duplicate images in Aperture?

    How do I find duplicate images in Aperture AFTER importing my entire library from iPhoto? There must be a way to do that, right? Please let me know the secret. Thanks!

  • The Artists in my Itunes are ordered incorrectly, Completely!

    Hi, My itunes library has gone slightly strange. The artists order has changed, it seems that they are now being ordered by artist surname for some of them, but there are some that are completley out of order. Patrick Wolf for instance, comes at the

  • No Search Available In Password Protected Preview Document

    You simply cannot search the pdf at all in SL if it is encrypted with a password. I have a pdf with important data. To access it, I entered a password, and I can search it in Leopard. The same document, after the password is entered, cannot be search

  • Repair SQL server

    I have schedule DTS to import every day few tables. It had been working great and had no problem. All of a sudden I started getting this error. ERROR AT DESTINATION FOR ROW NUMBER 100. ERROR ENCOUNTERED SO FAR IN THE TASK. 1 UNIDENTIFIED ERROR. (SQL