Printing chinese text in a smartform.

Whenever, I try to write chinese text in the smrtform, some weird characters appear. How can I paste chinese text in the smartform. Please provide me a solution.
Moderator message: please do some research before asking.
[Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
Edited by: Thomas Zloch on Feb 28, 2011 9:21 AM

Please check with your basis that your output device support print Chinese character. Or, you can search more in forum, there are a lot of threads about print Chinese and other Unicode characters in form.
Thanks,

Similar Messages

  • Printing Chinese Characters on Labels using ZEBRA

    Dear all,
    Could someone tell me how to Print Chinese characters on labels using ZEBRA Printer.
    Thanks & Regards,
    Joseph.

    Hi Joseph,
    How were u able to resolve your issue on Chinese font printing using Zebra? This is because I'm supposed to print Chinese texts & data using Zebra label printer. The problem is, inspite of using the Chinese font residing in the printer's memory card, i am not getting any output whenever i run a standard SAP report (VL74) calling a customized saprscipt report. Please help check my codes below. Also, I'm not sure of the command ^A1B, if it is still needed everytime i try to print a text, since i already used the command ^CW1,B:MSUNG.FNT.
    I placed them in the Main area of Sapscript. Thanks in advance.
    PERFORM 'GET_MORE_DATA' IN PROGRAM 'ZTEST'
    USING &NAST-KSCHL&
    USING &VBPLK-VENUM&
    USING &VBPLK-VPOBJKEY&
    USING &VBPLA-KUNWE&
    CHANGING &GF_MAKTX&
    CHANGING &GF_VEMNG&
    CHANGING &GF_KDMAT&
    CHANGING &GF_VBELN&
    CHANGING &GF_MATNR&
    ENDPERFORM
    /:NEW-PAGE
    / ^XA
    / ^CW1,B:MSUNG.FNT
    / DFZ5L3_L-1FS
    / ^PRC
    / LH0,0FS
    / ^LL1981
    / ^MD0
    / ^MNY
    / LH0,0FS
    / FO700,649A1B,48,0FRFN999^FS
    / FO1084,309A1B,46,0CI0FRFN998FS
    / FO315,330A1B,46,0CI0FRFN997FS
    / FO459,1351A1B,46,0CI0FRFN996FS
    / FO829,396A1B,46,0CI0FRFN995FS
    / FO54,1777A1B,46,0CI0FRFD中文 1FS
    / FO186,1774A1B,46,0CI0FRFD中文 2FS
    / FO318,1774A1B,46,0CI0FRFD中文 3FS
    / FO315,814A1B,46,0CI0FRFD中文 4FS
    / FO456,1777A1B,46,0CI0FRFD中文 5FS
    / FO12,18GB1162,1942,6^FS
    / FO147,18GB135,1942,6^FS
    / FO411,18GB135,1942,6^FS
    / FO660,18GB135,1942,6^FS
    / FO916,18GB135,1942,6^FS
    / ^XZ
    /:NEW-PAGE
    / ^XA
    / ^XFZ5L3_L-1.ZPL
    / FN999FD&GF_MAKTX&^FS
    / FN998FD&GF_VEMNG&^FS
    / FN997FD&GF_KDMAT&^FS
    / FN996FD&GF_VBELN&^FS
    / FN995FD&GF_MATNR&^FS
    / ^PQ1,0,1,N
    / ^XZ
    / ^FX End of job

  • Unable to print chinese characters in Smartforms use Zebra printer

    Hi,all.
    My printer is Zebra ZM400 300dpi,I created a new output device 'TestDevice' and use the Lzeb3 Device type.
    In my smartofrms i used the Zebra command to rotated text.Now the smartforms counld not print chinese characters but '#' instead.(style font 'ANDALE_S')
    Anyone could help me....
    Thanks Advance.
    Andy Lee.

    Hello Andy,
    If you use the device type LZEBU3 with font ANDALE_S, then when you print then the SAP system
    send a print control for activating the ANDALE font installed on the printer, and the text should
    be outputed over this font.
    When you get # during print then this means that the device type or the SAP font don't support
    this character(this was the original problem), when you get a "space" then this means that the
    font which is used by the printer don't support this character.
    I think this can have 2 causes in your case:
    1. The SAP system use the print control SF000 when you use ANDALE_S, which contains
    the print control ^CI17^F8 in HEX form. This should activate the ANDALE font on your printer.
    (You can find this under tr. SE73 -> Printer Fonts -> LZEBU3 -> ANDALE_S)
    You should check wheter this is the correct print control. You should find on the printer an option
    which list you all installed fonts, and also the print control which can be used for activating it.
    Compare this print control from the printer with the above print control from the SAP system.
    If you see a differnce then change the print control in the SAP system.(Before you do that please
    copy the device type LZEBU3 into customer namespace, don't change the original SAP device type)
    2. The font installed on the printer don't support the character which you use. Contact Zebra to confirm this, and ask for a ANDALE font which supports the character.
    Best regards,
    Norbert

  • How to print the texts retrived by using READ_TEXT fun module in Smartform

    Please tell me how to print the text which is rertrived by using the READ_TEXT function module in smartform.
    I have coded all things in the program lines and in that i am retriveing the long texts.
    I am getting the text lines in my internal table clearly, the thing is that I am not able to pass these lines to the text.
    I have to print the trouble ticket. in that the notes log I have to pass.
    its urgent. Points will be rewarded for any type of clue. whether it will work or not.

    There are a few ways to do it. If you need to take all of the text in the text type, in your SF text element choose "Include Text".
    Populate the fields with the data that corresponds to the text type. It is similar to the interface to the FM "Read_Text.
    Text Name
    Text Obje
    Text ID 
    Language
    Encase any variables with the "&" symbol.
    If you have already coded the call to the FM "READ_TEXT" and loaded the text into an internal table, create a loop and loop through the itab. Inside of the loop create a text element and add a variable in the text element for the field you are looking to output.

  • How to print Arabic text along with the English in smartform ( ECC6 version

    Hi All,
    our is ECC6 version, Non unicode, ABAP stack ( not dual stack )
    is it possible to print in Arabic language in the above version ?
    if yes, then please let me know how to print Arabic text and English text in the same smartfrom.
    i tried in the following procedures :
    1) i created standard text (SO10) in arabic language.
    i called in the smartform ( include text - i )
    langage AR
    but system throws error message saying, required language is not installed.
    2) if i use READ_TEXT function module.
    text getting printed in diff format but not in arabic.
    waiting for your replies..

    ECC6 and Non-Unicode? I think you'll need multiple code pages, I doubt there's a mixed Arabic/Latin1 available. And I don't think SAP supports new MDMP systems any more. If you need to support multiple languages you really need to go Unicode. It's probably easier to do the Unicode conversion than to try to support multiple code pages and you have to make the switch eventually.

  • Printing Standard TEXT  with multiple paragraphs in smartform

    Hello all,
    I have a requirement that, there is a very long standard text stored in a notification of an order in SAP ISU system. The text contains multiple paragraphs with indentations. I want to print this text directly into the smartform WITH SAME INDENTATION AND PARAGRAPH FORMATTING.
    First i am reading the entire text using FM READ_TEXT.
    My first  problem is even if i read the text into a variable of type STRING , it just prints 255 characters of it.
    And secondly if i try to printout it using LOOP AT node in smartforms, it prints the entire content but without any formatting .
    Please let me know whether it is possible to print standard text in smartforms or not
    Thanks
    Nilesh Puranik

    Hey ,
    Well thanks for that but my replies got posted 2-3 times unknowingly, could'nt help it.
    Coming to the problem, i  guess you did not get my point when i say dynamic texts for each service order.
    In my Report i am using LOOP AT ITAB ..where in itab i  am storing a service order no i.e. ITAB-ORDER_NO
    Now for every order there is standard text maintained in SO10 starting with order name
    so my code goes like this.
    LOOP AT ITAB.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        ID                            = 'LTXT'
        LANGUAGE            = 'E'
        NAME                      = ITAB-order_no
        OBJECT                   = 'QMSM'
      TABLES
        LINES                         = LINES .
    CALL <SMART FORM Fm>
    ENDLOOP.
    Hence whatever Standard text maintained for that service order i  want to display it as it is in the smartform with same paragraphs formatting and indentation.
    IF i use a variable in smartform and pass the entire text  after using READ_TEXT , it does not format the text  and it just prints only 255 characters even if i define it of type STRING .
    Hence i am stuck in this scenario.
    Appreciate ur help though.
    Thanks
    Nilesh

  • Issue with printing report texts in Smartform

    Hi ,
    I developed a smartform and a print program. In the title of the smartform I need print a text depend on the company code. For this I prepared this text in the print program like the following.
    case rbkp-bukrs.
      when 'IT10'
        smartform_struct-title = text-010.
    endcase.
    The problem is some times these texts are not printing on the form output. User are mad at this. when they complines me and I go and look at it, it is fine. I don't think this is printer issue. Any clues please let me know.
    Thank you,
    Surya

    Hi Phani,
    Thanks for your reply. In fact both me and user are doing the same. For user some times this text is not showing and some times it is. This is very strange.
    I can do this by keeping it in text element. But for some texts we need to add some other text in between dynamically.
    for example : for BE10 we need to show like,
    CONCATENATE 'This text is prepared on behalf of  (' <vendor name> ') ' some text' INTO w_title_text.
    In this case: I have tried preparing this text in the program lines node. Here the problem is I can able to mention single quote in prepare the text. In the above example it is bold.
    Basically I don't what's happening when printing report texts. But if there is a way to show single quote while prepare text that should be fine.
    Thank you
    Surya

  • Smartforms-Junk Characters being printed with text

    Hi,
    I have two issues regarding smartforms
    1.Whenever I add any text in the smartform in the text editor ,for example, "test",
    the print preview shows as above, BUT in the printout it comes as #test#.
    2.Similarly, when I use READ_TEXT function module to get any text from the transaction, for example, AT&T, the output in the preview and printout comes as (AT<(>&<)>T.
    Can any one tell me how to avoid this junk data .
    Regards
    Rasheed

    hi
    good
    Did you follow this process if not check them again,
    1- Execute the program and see how the data flowing from driver program to the smartform.
    2-Check the printer setup for you particular page
    3-Check the alignment of the data that you r going to print.
    thanks
    mrutyun^

  • Vertical printing the Text in Smartforms

    Hi Friends,
    Thanks in Advance,
    Is there any posibility to print the text in Vertical, in Dot Matrix Printer
    Please resolve the Issue.
    Thanks & Regards:
    Manjula.M

    Hi,
    This thread will helpful to you.
    vertical writing in smartforms
    Thanks,
    Sree.

  • Print Arabic text in smartforms

    Hi,
    How to print Arabic text in smartforms, where i have to write in arabic please help me as soon as possible.
    Thanks,
    MSA.

    Hi,
    create the text in Arabic .
    ex: goto SO10   give the text name and language is Arabic.
    when u call that pass the language as Arabic.
    ex:
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    id                      = txt_id
    language                = txt_langu "Rabic language.
    name                    = txt_name
    object                  = txt_obj
    TABLES
    lines                   = t_line.
    Regards,
    Venkat.

  • Print a text on last page of smartform rpt

    Hi All
    I want to print a text on first and last page of report created in smartforms
    plz suggest..........

    Hi,
    In a Smart Form, you can use a similar MAIN window approach. For a secondary window, you might wish to use a conditional event such as <b>'Only After End of Main Window'</b>.
    Map page FIRST to NEXT and page NEXT to NEXT as you have done; page LAST does not need to be mapped to any other page. Make sure the MAIN window is contained on both page FIRST and page NEXT. Then add a command node within your MAIN window at the very end of this window (outside of any tables or loops). In its general attributes click on the 'Go to new page' and select the LAST page here.
    During form output, regardless of whether the MAIN window is completed within page FIRST or NEXT, page LAST will be triggered as your final page.
    Note: Any secondary windows on pages FIRST or NEXT with the condition 'only after end of MAIN window' may no longer print, as form output now will advance to the LAST page before this condition is satisfied.
    Regards
    Sudheer

  • Printing the text in vertical format in Smartforms?

    Hi,
       How to print a text in vertical format from bottom to top?
       just like this..........
                S
                M
                E
                T
                S
                Y
                S
    Thanks.

    Hi
    If u want to print data in vertical format, just create one style , in that create paragraph format as left justfied 0 and right justified as windowlength-1.use this paragraph format for u r text.
    OR
    Have to create command within a window (window would be containingtexts which you want to print vertically).Within Command on General Attributes you will have to specify appropriateprint control one which is useful for your requirement.
    Regards
    Raj

  • Printing item text smartforms

    Hai friends,
    In my invoice i have 7 line items and some materials are "Duty Paid". For this they are maintaining a text in "Item Text" tab in VF01 transaction for each materials.
    I have to print the text one by one in the footer.
    How can i do this. How to display the item text.
    Thanks.

    Hi,
    Use the Function module READ_TEXT to read the item texts and print them in the footer.
    You need to pass paramters to FM Read_text. Go to VF03. go to item texts. Highlight any item texts and click on the display button below. It will take you to the text editor. On that screen Go to-> Header will show the following details.
    Text Name       1203832486000140                     
    Language        EN                                   
    Text ID         0002 Item note                       
    Text Object     VBBP       Sales     Item texts      
    Pass the same values to the fields of READ_TEXT FM.
    TEXTNAME would be the concatenation of salesorder and line item.
    Thanks,
    Vamshi.

  • Print Change Text in PO

    Hi All,
             I have replaced standard script(MEDRUCK) with Zsmart form for PO printing. when user change in any line of PO, like he have changed quantity. for this change a text message as **PO quantity changed** print in standard script. Now I want print this text message in my smart form . I know this is the message field T166T-CHTXT but i cant find any relation between this text messege and PO line item. So plz tell me how can i print it my smart form. I am sending u the programe where i have put my smart form.
      INCLUDE FM06PE02                                                   *
    form entry_neu using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
      clear ent_retco.
      if nast-aende eq space.
        l_druvo = '1'.
      else.
        l_druvo = '2'.
      endif.
      call function 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      check ent_retco eq 0.
    ***to get the data not given by the above function module
    ***as, on some std conditions some data may be deleted by the same.
      SELECT * FROM EKPO INTO TABLE l_doc-XEKPO
               WHERE EBELN EQ l_doc-XEKKO-EBELN AND
                     LOEKZ NE 'L'.
      IF l_doc-XTKOMV IS INITIAL.
        SELECT * FROM KONV INTO TABLE l_doc-XTKOMV
                 WHERE KNUMV EQ l_doc-XEKKO-KNUMV.
      ENDIF.
       call function 'ME_PRINT_PO'
          exporting
               ix_nast        = l_nast
               ix_druvo       = l_druvo
               doc            = l_doc
               ix_screen      = ent_screen
               ix_from_memory = l_from_memory
               ix_toa_dara    = toa_dara
               ix_arc_params  = arc_params
               ix_fonam       = tnapr-fonam          "HW 214570
          importing
               ex_retco       = ent_retco.
      data: l_komk type komk occurs 0 with header line.
      DATA: lf_fm_name            TYPE rs38l_fnam.
      TYPES: BEGIN OF TP_RECORD,
              EBELP TYPE EKPO-EBELP,
              KNUMH TYPE KONP-KNUMH,
              END OF TP_RECORD.
      data: CD_record type TP_RECORD OCCURS 0 WITH HEADER LINE.
      TYPES: BEGIN OF TP_TAX,
             EBELP TYPE EKPO-EBELP,
             KSCHL TYPE KONP-KSCHL,
             KBETR TYPE KONP-KBETR,
             KONWA TYPE KONP-KONWA,
             VTEXT type T685T-VTEXT,
             END OF TP_TAX.
      DATA: TAB_TAX TYPE TP_TAX OCCURS 0 WITH HEADER LINE.
      data: wa_ekpo  type ekpo,
            wa_komv  type komv,
            wa_pekpo type pekpo.
      DATA: T_ITEM TYPE STANDARD TABLE OF ZMM_PO_ITEM WITH HEADER LINE.
      data: l_VAKEY type KONH-VAKEY,
            l_KNUMH type KONH-KNUMH.
      DATA: ls_control_param      TYPE ssfctrlop.
      DATA: ls_composer_param     TYPE ssfcompop.
      DATA: ls_recipient          TYPE swotobjid.
      DATA: ls_sender             TYPE swotobjid.
      DATA: lf_formname           TYPE tdsfname.
      DATA: ls_addr_key           LIKE addr_key.
      DATA: ls_job_info           TYPE ssfcrescl.
      DATA: ls_arc_params         TYPE ARC_PARAMS.
      DATA: ls_MAIL_APPL_OBJ      TYPE swotobjid.
      DATA: INPUT                 TYPE SSFCOMPIN.
      DATA: RESULT                TYPE SSFCRESOP.
      DATA: SECESS                TYPE KONP-KBETR .
      loop at l_doc-XEKPO into wa_ekpo.
        refresh CD_RECORD.
    *****GET TAXES FOR MATERIAL *************************
        if wa_ekpo-matnr is not initial.
          select knumh from A363 into corresponding fields of CD_RECORD
                 WHERE KAPPL = 'TX' AND
                       WERKS = WA_EKPO-WERKS     AND
                       LIFNR = l_doc-XEKKO-LIFNR AND
                       MATNR = WA_EKPO-MATNR     AND
                       DATBI GE l_doc-XEKKO-BEDAT.
            CD_RECORD-EBELP = wa_ekpo-EBELP.
            append CD_RECORD.
          endselect.
          if CD_RECORD[] is not initial.
            SELECT KSCHL KBETR KONWA FROM KONP INTO CORRESPONDING FIELDS OF TAB_TAX
                   FOR ALL ENTRIES IN CD_RECORD
                   WHERE KNUMH    =  CD_RECORD-KNUMH AND
                         LOEVM_KO NE 'X'.
              TAB_TAX-EBELP = wa_ekpo-EBELP.
              if TAB_TAX-KONWA = '%'.
                TAB_TAX-KBETR = TAB_TAX-KBETR / 10.
              endif.
              SELECT SINGLE VTEXT FROM T685T INTO TAB_TAX-VTEXT
                     WHERE SPRAS = 'EN' AND
                           KAPPL = 'TX' AND
                           KSCHL = TAB_TAX-KSCHL.
              APPEND TAB_TAX.
            ENDSELECT.
          endif.
        endif.
    ****GET TAXES FOR MATERIAL GROUP************************
        refresh CD_RECORD.
        if wa_ekpo-matkl is not initial.
          if wa_ekpo-knttp eq 'K' .
          select knumh from A700 into corresponding fields of CD_RECORD
                 WHERE KAPPL = 'TX' AND
                       WERKS = WA_EKPO-WERKS AND
                       MATKL = WA_EKPO-MATKL AND
                       DATBI GE l_doc-XEKKO-BEDAT AND
                       LIFNR EQ L_DOC-XEKKO-LIFNR .
            CD_RECORD-EBELP = wa_ekpo-EBELP.
            append CD_RECORD.
          endselect.
          if CD_RECORD[] is not initial.
            SELECT KSCHL KBETR KONWA FROM KONP INTO CORRESPONDING FIELDS OF TAB_TAX
                   FOR ALL ENTRIES IN CD_RECORD
                   WHERE KNUMH = CD_RECORD-KNUMH AND
                         LOEVM_KO NE 'X'.
              TAB_TAX-EBELP = wa_ekpo-EBELP.
              if TAB_TAX-KONWA = '%'.
                TAB_TAX-KBETR = TAB_TAX-KBETR / 10.
              endif.
              SELECT SINGLE VTEXT FROM T685T INTO TAB_TAX-VTEXT
                     WHERE SPRAS = 'EN' AND
                           KAPPL = 'TX' AND
                           KSCHL = TAB_TAX-KSCHL.
              APPEND TAB_TAX.
            ENDSELECT.
          endif.
        endif.
        endif.
      endloop.
    ******Fill T_ITEM***************
      loop at l_doc-XEKPO into wa_ekpo.
        CLEAR T_ITEM.
        MOVE-CORRESPONDING wa_ekpo TO T_ITEM.
        MOVE WA_EKPO-EMATN TO T_ITEM-MATNR.
    ********Field NETPR (net price) used for Gross price per piece**
       SELECT SINGLE KBETR FROM KONV
              INTO   T_ITEM-NETPR
                     WHERE KNUMV EQ l_doc-XEKKO-KNUMV AND
                           KPOSN EQ wa_ekpo-EBELP     AND
                           KSCHL EQ 'P000'.
        LOOP AT l_doc-xtkomv INTO WA_KOMV
                where KPOSN = T_ITEM-EBELP AND
                      ( ( KSCHL = 'P000' AND KBETR IS NOT INITIAL ) OR
                        ( KSCHL = 'P001' AND KBETR IS NOT INITIAL ) OR
                        ( KSCHL = 'PB00' AND KBETR IS NOT INITIAL ) OR
                        ( KSCHL = 'PBXX' AND KBETR IS NOT INITIAL ) ).
          MOVE WA_KOMV-KBETR TO T_ITEM-NETPR.
        ENDLOOP.
    *******Get Discount************************
        LOOP AT l_doc-xtkomv INTO WA_KOMV
                where KPOSN = T_ITEM-EBELP AND
                      ( ( KSCHL = 'R000' AND KBETR IS NOT INITIAL ) OR
                        ( KSCHL = 'R001' AND KBETR IS NOT INITIAL ) OR
                        ( KSCHL = 'R002' AND KBETR IS NOT INITIAL ) ).
          T_ITEM-C_DSCNT = WA_KOMV-WAERS.
          T_ITEM-DSCNT   = WA_KOMV-KBETR.
          IF T_ITEM-C_DSCNT NE 'INR'.
            T_ITEM-DSCNT   = T_ITEM-DSCNT / 10.
          ENDIF.
        ENDLOOP.
    *******Get Taxes**************************
        LOOP AT TAB_TAX
                WHERE EBELP = T_ITEM-EBELP.
          CASE TAB_TAX-KSCHL.
            WHEN 'JMOP' OR 'JMOQ' OR 'JSRT'.
              IF TAB_TAX-KBETR IS NOT INITIAL.
                T_ITEM-EXCSE   = TAB_TAX-KBETR.
                T_ITEM-C_EXCSE = TAB_TAX-KONWA.
                T_ITEM-KSCHL   = TAB_TAX-KSCHL .
              ENDIF.
            WHEN 'JEC1' OR 'JEC3'.
              IF TAB_TAX-KBETR IS NOT INITIAL.
                T_ITEM-CESS   = TAB_TAX-KBETR.
                T_ITEM-C_CESS = TAB_TAX-KONWA.
                T_ITEM-KSCHL   = TAB_TAX-KSCHL .
              ENDIF.
            WHEN 'JVRD' OR 'JIPC'.
              IF TAB_TAX-KBETR IS NOT INITIAL.
                T_ITEM-VAT_CST   = TAB_TAX-KBETR.
                T_ITEM-C_VAT_CST = TAB_TAX-KONWA.
                T_ITEM-KSCHL   = TAB_TAX-KSCHL .
              ENDIF.
            WHEN 'JES1' .
              IF TAB_TAX-KBETR IS NOT INITIAL.
                SECESS          = TAB_TAX-KBETR.
                T_ITEM-C_SECESS = TAB_TAX-KONWA.
                T_ITEM-KSCHL    = TAB_TAX-KSCHL .
              ENDIF.
          ENDCASE.
        ENDLOOP.
    ********Get Delivery Date*****************
        read table l_doc-XPEKPO into wa_pekpo with key ebelp = WA_EKPO-EBELP.
        T_ITEM-EINDT = WA_PEKPO-EINDT.
        if l_doc-XEKKO-BSTYP = 'L'.
    Get Price Per Unit For Scheduling agreement********
          concatenate T_ITEM-EBELN T_ITEM-EBELP INTO l_VAKEY.
          SELECT SINGLE KNUMH FROM KONH INTO L_KNUMH
                 WHERE  VAKEY = l_VAKEY.
          SELECT SINGLE KBETR FROM KONP INTO T_ITEM-NETPR
                 WHERE  KNUMH = L_KNUMH AND
                        KSCHL = 'P000'.
    Get Discount For Scheduling agreement  ********
          SELECT SINGLE KBETR KONWA FROM KONP INTO (T_ITEM-DSCNT,T_ITEM-C_DSCNT)
                 WHERE  KNUMH = L_KNUMH AND
                        KSCHL = 'R000'.
          if sy-subrc <> 0.
            SELECT SINGLE KBETR KONWA FROM KONP INTO (T_ITEM-DSCNT,T_ITEM-C_DSCNT)
                   WHERE  KNUMH = L_KNUMH AND
                          KSCHL = 'R001'.
            if sy-subrc <> 0.
              SELECT SINGLE KBETR KONWA FROM KONP INTO (T_ITEM-DSCNT,T_ITEM-C_DSCNT)
                     WHERE  KNUMH = L_KNUMH AND
                            KSCHL = 'R002'.
            endif.
          endif.
          if T_ITEM-DSCNT is not initial.
            T_ITEM-DSCNT = T_ITEM-DSCNT / 10.
          endif.
        endif.
        APPEND T_ITEM.
      endloop.
      IF TNAPR-SFORM IS NOT INITIAL.
    SmartForm from customizing table TNAPR
        lf_formname = tnapr-sform.
    determine smartform function module for PO
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
             EXPORTING  formname           = lf_formname
                    variant            = ' '
                    direct_call        = ' '
             IMPORTING  fm_name            = lf_fm_name
             EXCEPTIONS no_form            = 1
                        no_function_module = 2
                        OTHERS             = 3.
       IF sy-subrc <> 0.
      error handling
         cf_retcode = sy-subrc.
         PERFORM protocol_update.
       ENDIF.
    ENDIF.
        CALL FUNCTION 'SSF_CREATE_COMPOSER_INPUT'
          EXPORTING
            ARCHIVE_PARAMETERS = ls_arc_params
            USER_SETTINGS      = 'X'
            MAIL_SENDER        = ls_sender
            MAIL_RECIPIENT     = ls_recipient
            MAIL_APPL_OBJ      = ls_MAIL_APPL_OBJ
            OUTPUT_OPTIONS     = ls_composer_param
            CONTROL_PARAMETERS = ls_control_param
          IMPORTING
            INPUT              = input.
        CALL FUNCTION 'SSFCOMP_OPEN'
          EXPORTING
            INPUT  = input
          IMPORTING
            RESULT = RESULT
          EXCEPTIONS
            ERROR  = 1
            OTHERS = 2.
        IF SY-SUBRC EQ 0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
          ls_control_param-no_open  = 'X'.
          ls_control_param-no_close = 'X'.
          CALL FUNCTION lf_fm_name
            EXPORTING
           ARCHIVE_INDEX              =
           ARCHIVE_INDEX_TAB          =
              ARCHIVE_PARAMETERS         = ls_arc_params
              CONTROL_PARAMETERS         = ls_control_param
              MAIL_APPL_OBJ              = ls_MAIL_APPL_OBJ
              MAIL_RECIPIENT             = ls_recipient
              MAIL_SENDER                = ls_sender
              OUTPUT_OPTIONS             = ls_composer_param
              USER_SETTINGS              = 'X'
              ZXEKKO                     = l_doc-XEKKO
              ZXPEKKO                    = l_doc-XPEKKO
              SECESS                     = SECESS
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
            TABLES
              L_XEKPO                    = l_doc-XEKPO
              L_XEKPA                    = l_doc-XEKPA
              L_XPEKPO                   = l_doc-XPEKPO
              L_XEKET                    = l_doc-XEKET
              L_XTKOMV                   = l_doc-xtkomv
              L_XEKKN                    = l_doc-Xekkn
              L_XEKEK                    = l_doc-Xekek
              L_XKOMK                    = l_komk
              T_ITEM                     = T_ITEM
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CALL FUNCTION 'SSFCOMP_CLOSE'
            IMPORTING
              RESULT        =
            EXCEPTIONS
              ERROR         = 1
              OTHERS        = 2
          IF SY-SUBRC <> 0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ENDIF.
      ELSE.
        call function 'ME_PRINT_PO'
          EXPORTING
            ix_nast        = l_nast
            ix_druvo       = l_druvo
            doc            = l_doc
            ix_screen      = ent_screen
            ix_from_memory = l_from_memory
            ix_toa_dara    = toa_dara
            ix_arc_params  = arc_params
            ix_fonam       = tnapr-fonam                        "HW 214570
          IMPORTING
            ex_retco       = ent_retco.
      ENDIF.
    endform.                    "entry_neu
    *eject
    Umlagerungsbestellung,  Hinweis 670912                               *
    form entry_neu_sto using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print,
            F_STO.                                              "670912
      clear ent_retco.
      if nast-aende eq space.
        l_druvo = '1'.
      else.
        l_druvo = '2'.
      endif.
      F_STO = 'X'.                                              "670912
      call function 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      check ent_retco eq 0.
      call function 'ME_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = tnapr-fonam                          "HW 214570
          ix_sto         = F_STO                                "670912
        IMPORTING
          ex_retco       = ent_retco.
    endform.                    "entry_neu_sto
    *eject
    Mahnung
    form entry_mahn using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
      clear ent_retco.
      l_druvo = '3'.
      call function 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      check ent_retco eq 0.
      call function 'ME_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = tnapr-fonam                          "HW 214570
        IMPORTING
          ex_retco       = ent_retco.
    endform.                    "entry_mahn
    *eject
    Auftragsbestätigungsmahnung
    form entry_aufb using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
      clear ent_retco.
      l_druvo = '7'.
      call function 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      check ent_retco eq 0.
      call function 'ME_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = tnapr-fonam                          "HW 214570
        IMPORTING
          ex_retco       = ent_retco.
    endform.                    "entry_aufb
    *eject
    Lieferabrufdruck für Formular MEDRUCK mit Fortschrittszahlen
    form entry_lphe using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_xfz,
            l_doc   type meein_purchase_doc_print.
      data: l_komk type komk occurs 0 with header line.
      DATA: lf_fm_name            TYPE rs38l_fnam.
      DATA: T_EKET      TYPE TABLE OF EKET WITH HEADER LINE,
            T_EKET_NEW  TYPE TABLE OF EKET WITH HEADER LINE.
      DATA: WA_EKET     TYPE EKET,
            WA_EKET_NEW TYPE EKET.
      DATA: L_DATE    TYPE RM06B-EEIND,
            MAX_ABRUF TYPE EKEK-ABRUF.
      DATA: T_DEL_SCH TYPE TABLE OF ZSTR_DEL_SCH WITH HEADER LINE.
      DATA: WA_EKPO   TYPE EKPO,
            WA_EKEK   TYPE EKEK.
      DATA: TEMP_DATE       LIKE SY-DATUM,
            TEMP_MONTH      TYPE SPMON,
            THIS_MONTH      TYPE SPMON,
            NEXT_MONTH      TYPE SPMON,
            NEXT_NEXT_MONTH TYPE SPMON,
            L_DAY(2)        TYPE N.
      DATA: QTY_TEMP TYPE I.
      DATA: MDPAX TYPE MDPA,
            MDPMX TYPE TABLE OF MDPM WITH HEADER LINE,
            MDSBX TYPE TABLE OF MDSB WITH HEADER LINE.
      DATA: lf_formname           TYPE tdsfname.
      clear ent_retco.
      l_druvo = '9'.
      l_xfz = 'X'.
      call function 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      check ent_retco eq 0.
    call function 'ME_PRINT_PO'
          exporting
               ix_nast        = l_nast
               ix_druvo       = l_druvo
               doc            = l_doc
               ix_xfz         = l_xfz
               ix_screen      = ent_screen
               ix_from_memory = l_from_memory
               ix_toa_dara    = toa_dara
               ix_arc_params  = arc_params
               ix_fonam       = tnapr-fonam          "HW 214570
          importing
               ex_retco       = ent_retco.
    *T_EKET[] = l_doc-XEKET[].
      LOOP AT l_doc-XEKET INTO WA_EKET.
        CLEAR: WA_EKET_NEW,
               T_EKET_NEW.
        CASE WA_EKET-LPEIN.
          WHEN '2'.
            T_EKET_NEW = WA_EKET.
            WA_EKET_NEW = WA_EKET.
            T_EKET_NEW-MENGE = WA_EKET-MENGE DIV 2.
           QTY_TEMP = WA_EKET-MENGE DIV 2.
           T_EKET_NEW-MENGE =  QTY_TEMP.
            CALL FUNCTION 'COS6_QUANTITY_ROUND'
              EXPORTING
                I_QUANTITY             = T_EKET_NEW-MENGE
                I_UNIT                 = 'EA'
              IMPORTING
                E_QUANTITY             = T_EKET_NEW-MENGE
            EXCEPTIONS
              UNIT_NOT_DEFINED       = 1
              OTHERS                 = 2
            IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
            APPEND T_EKET_NEW.
            WRITE WA_EKET-EINDT TO L_DATE USING EDIT MASK '__.__.____'.
            CALL FUNCTION 'DATE_IN_FUTURE'
              EXPORTING
                ANZAHL_TAGE                   = '6'
                IMPORT_DATUM                  = L_DATE
              IMPORTING
              EXPORT_DATUM_EXT_FORMAT       = WA_EKET_NEW-EINDT
                EXPORT_DATUM_INT_FORMAT       = WA_EKET_NEW-EINDT
            WA_EKET_NEW-MENGE = WA_EKET-MENGE - T_EKET_NEW-MENGE.
            APPEND WA_EKET_NEW TO T_EKET_NEW.
          WHEN '3'.
            T_EKET_NEW = WA_EKET.
            WA_EKET_NEW = WA_EKET.
            T_EKET_NEW-MENGE = WA_EKET-MENGE DIV 2.
            APPEND T_EKET_NEW.
            CALL FUNCTION 'MM_ARRANG_GET_END_OF_MONTH'
              EXPORTING
                I_DATUM = WA_EKET-EINDT
              IMPORTING
                E_DATUM = WA_EKET_NEW-EINDT.
            WA_EKET_NEW-MENGE = WA_EKET-MENGE - T_EKET_NEW-MENGE.
            APPEND WA_EKET_NEW TO T_EKET_NEW.
          WHEN OTHERS.
            APPEND WA_EKET TO T_EKET_NEW.
        ENDCASE.
      ENDLOOP.
      THIS_MONTH = SY-DATUM+(6).
      CALL FUNCTION 'HR_BR_ADD_MONTH_TO_DATE'
        EXPORTING
          DMM_DATIN       = SY-DATUM
          DMM_COUNT       = '1'
          DMM_OPER        = '+'
          DMM_POS         = '1'
        IMPORTING
          DMM_DAOUT       = TEMP_DATE
    EXCEPTIONS
      UNKNOWN         = 1
      OTHERS          = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      NEXT_MONTH = TEMP_DATE+(6).
      CLEAR TEMP_DATE.
      CALL FUNCTION 'HR_BR_ADD_MONTH_TO_DATE'
        EXPORTING
          DMM_DATIN       = SY-DATUM
          DMM_COUNT       = '2'
          DMM_OPER        = '+'
          DMM_POS         = '1'
        IMPORTING
          DMM_DAOUT       = TEMP_DATE
    EXCEPTIONS
      UNKNOWN         = 1
      OTHERS          = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      NEXT_NEXT_MONTH = TEMP_DATE+(6).
      LOOP AT l_doc-XEKPO INTO WA_EKPO.
        CLEAR: T_DEL_SCH,
               WA_EKEK.
        MOVE-CORRESPONDING WA_EKPO TO T_DEL_SCH.
        CLEAR MAX_ABRUF.
        LOOP AT l_doc-Xekek INTO WA_EKEK.
          IF WA_EKEK-ABRUF GT MAX_ABRUF.
            MAX_ABRUF = WA_EKEK-ABRUF.
          ENDIF.
        ENDLOOP.
        CLEAR WA_EKEK.
        READ TABLE l_doc-Xekek INTO WA_EKEK
             WITH KEY EBELN = WA_EKPO-EBELN
                      EBELP = WA_EKPO-EBELP
                      ABRUF = MAX_ABRUF.
        T_DEL_SCH-LFNKD = WA_EKEK-LFNKD.
        LOOP AT T_EKET_NEW
             WHERE EBELN = WA_EKPO-EBELN AND
                   EBELP = WA_EKPO-EBELP.
    ****GET COMPONENTS***********************
          REFRESH: mdpmx, mdsbx.
          CLEAR: mdpmx, mdsbx.
          on change of t_eket_new-rsnum.
            mdpax-rsnum = t_eket_new-rsnum.
            mdpax-matnr = wa_ekpo-matnr.
            mdpax-pwwrk = wa_ekpo-werks.
            CALL FUNCTION 'MD_LESEN_KOMPONENTEN'
              EXPORTING
                emdpa = mdpax
              IMPORTING
                imdpa = mdpax
              TABLES
                mdpmx = mdpmx
                mdsbx = mdsbx.
          endon.
          TEMP_MONTH = T_EKET_NEW-EINDT+(6).
          CASE TEMP_MONTH.
            WHEN THIS_MONTH.
              L_DAY = T_EKET_NEW-EINDT+6(2).
              IF L_DAY BETWEEN '01' AND '07'.
                T_DEL_SCH-QTYW1 = T_DEL_SCH-QTYW1 + T_EKET_NEW-MENGE.
              ELSEIF L_DAY BETWEEN '08' AND '14'.
                T_DEL_SCH-QTYW2 = T_DEL_SCH-QTYW2 + T_EKET_NEW-MENGE.
              ELSEIF L_DAY BETWEEN '15' AND '22'.
                T_DEL_SCH-QTYW3 = T_DEL_SCH-QTYW3 + T_EKET_NEW-MENGE.
              ELSE.
                T_DEL_SCH-QTYW4 = T_DEL_SCH-QTYW4 + T_EKET_NEW-MENGE.
              ENDIF.
              T_DEL_SCH-C_QTYM1 = T_DEL_SCH-C_QTYM1 + mdpmx-erfmg.
            WHEN NEXT_MONTH.
              T_DEL_SCH-QTYM2 = T_DEL_SCH-QTYM2 + T_EKET_NEW-MENGE.
              T_DEL_SCH-C_QTYM2 = T_DEL_SCH-C_QTYM2 + mdpmx-erfmg.
            WHEN NEXT_NEXT_MONTH.
              T_DEL_SCH-QTYM3 = T_DEL_SCH-QTYM3 + T_EKET_NEW-MENGE.
              T_DEL_SCH-C_QTYM3 = T_DEL_SCH-C_QTYM3 + mdpmx-erfmg.
          ENDCASE.
          if mdpmx-matnr is not initial.
            T_DEL_SCH-C_MATNR = mdpmx-matnr.
            T_DEL_SCH-C_TXZ01 = mdpmx-maktx.
            T_DEL_SCH-PSTYP = WA_EKPO-PSTYP.
          endif.
        ENDLOOP.
        T_DEL_SCH-QTYTO = T_DEL_SCH-QTYW1 + T_DEL_SCH-QTYW2 + T_DEL_SCH-QTYW3 + T_DEL_SCH-QTYW4.
        APPEND T_DEL_SCH.
        CLEAR T_DEL_SCH.
      ENDLOOP.
    SmartForm from customizing table TNAPR
      lf_formname = tnapr-sform.
    determine smartform function module for PO
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING  formname           = lf_formname
                    variant            = ' '
                    direct_call        = ' '
           IMPORTING  fm_name            = lf_fm_name
           EXCEPTIONS no_form            = 1
                      no_function_module = 2
                      OTHERS             = 3.
       IF sy-subrc <> 0.
      error handling
         cf_retcode = sy-subrc.
         PERFORM protocol_update.
       ENDIF.
    ENDIF.
      CALL FUNCTION lf_fm_name
        EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
         USER_SETTINGS              = space
          ZXEKKO                     = l_doc-XEKKO
          ZXPEKKO                    = l_doc-XPEKKO
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
        TABLES
          L_XEKPO                    = l_doc-XEKPO
          L_XEKPA                    = l_doc-XEKPA
          L_XPEKPO                   = l_doc-XPEKPO
          L_XEKET                    = T_EKET_NEW
          L_XTKOMV                   = l_doc-xtkomv
          L_XEKKN                    = l_doc-Xekkn
          L_XEKEK                    = l_doc-Xekek
          T_DEL_SCH                  = T_DEL_SCH
       EXCEPTIONS
         FORMATTING_ERROR           = 1
         INTERNAL_ERROR             = 2
         SEND_ERROR                 = 3
         USER_CANCELED              = 4
         OTHERS                     = 5
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
    *- nast-sndex wird als Kennzeichen für Probedruck verwendet
        IF l_nast-kappl  EQ 'EL'    AND ent_screen  IS INITIAL AND
           l_from_memory IS INITIAL AND l_nast-sndex IS INITIAL.
    missing environment for limiting update print dependend data
          IF sy-ucomm NE '9ANZ' AND sy-ucomm NE '9DPR'.
            PERFORM update_release TABLES l_doc-xekpo l_doc-xekek l_doc-xekeh
                                                USING  l_druvo l_nast-kschl.
          ENDIF.
        ENDIF.
      ENDIF.
    endform.                    "entry_lphe
    *eject
    ****SUBROUTINE COPIED FROM INCLUDE LMEDRUCKF1K BY jithendra 28.12.2006***
    *****to change release status of delivery schedule
          FORM update_release                                           *
    -->  t_xekpo                                                       *
    -->  t_xekek                                                       *
    -->  t_xekeh                                                       *
    -->  p_druvo                                                       *
    -->  p_kschl                                                       *
    FORM update_release TABLES t_xekpo STRUCTURE ekpo
                               t_xekek STRUCTURE ekek
                               t_xekeh STRUCTURE ekeh
                        USING  p_druvo
                               p_kschl.
      TABLES: t161m.
      CLEAR t161m.
      SELECT SINGLE druab INTO t161m-druab FROM t161m
                             WHERE kvewe = 'B'
                             AND   kappl = 'EL'
                             AND   druvo = p_druvo
                             AND   kschl = p_kschl.
      IF NOT sy-subrc = 0 OR NOT t161m-druab = 'X'.
        EXIT.
      ENDIF.
      DELETE t_xekek WHERE webrl EQ '1' OR webrl EQ '2'.
      CALL FUNCTION 'ME_UPDATE_FROM_PRINTING'
        TABLES
          i_ekek = t_xekek
          i_ekeh = t_xekeh
          i_ekpo = t_xekpo
        EXCEPTIONS
          OTHERS = 1.
    ENDFORM.                    "update_release
    Lieferabrufdruck für Formular MEDRUCK ohne Fortschrittszahlen
    form entry_lphe_cd using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
      clear ent_retco.
      l_druvo = '9'.
      call function 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      check ent_retco eq 0.
      call function 'ME_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = tnapr-fonam                          "HW 214570
        IMPORTING
          ex_retco       = ent_retco.
    endform.                    "entry_lphe_cd
    *eject
    Feinabrufdruck für Formular MEDRUCK mit Fortschrittszahlen
    form entry_lpje using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_xfz,
            l_doc   type meein_purchase_doc_print.
      clear ent_retco.
      l_druvo = 'A'.
      l_xfz = 'X'.
      call function 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      check ent_retco eq 0.
      call function 'ME_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_xfz         = l_xfz
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = tnapr-fonam                          "HW 214570
        IMPORTING
          ex_retco       = ent_retco.
    endform.                    "entry_lpje
    *eject
    Feinabrufdruck für Formular MEDRUCK ohne Fortschrittszahlen
    form entry_lpje_cd using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
      clear ent_retco.
      l_druvo = 'A'.
      call function 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      check ent_retco eq 0.
      call function 'ME_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = tnapr-fonam                          "HW 214570
        IMPORTING
          ex_retco       = ent_retco.
    endform.                    "entry_lpje_cd
    *eject
      INCLUDE FM06PE02                                                   *
    form entry_neu_matrix using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
      clear ent_retco.
      if nast-aende eq space.
        l_druvo = '1'.
      else.
        l_druvo = '2'.
      endif.
      call function 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      check ent_retco eq 0.
      call function 'ME_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_mflag       = 'X'
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = tnapr-fonam                          "HW 214570
        IMPORTING
          ex_retco       = ent_retco.
      data: l_komk type komk occurs 0 with header line.
      DATA: lf_fm_name            TYPE rs38l_fnam.
    endform.                    "entry_neu_matrix
    *eject
    Angebotsabsage
    form entry_absa using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
      l_druvo = '4'.
      clear ent_retco.
      call function 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_dru

    Hi,
    Depending on whether you have a Sales order or Purchase order.
    If sales order -> then go to NACE -> Sales -> check your Zsmartform
    If Purchase order -> go to NACE -> under PO output -> find your Zsmartform.
    In both cases, after u find your smartform name, thru change log.
    At runtime read what are the header text changes  and pass it to the smartform.
    You can use FM read_txt for this.
    Hope this helps.

  • How to print certain text on user selected documents?

    Hi,
    This question is related to SD. I need to know whether is it posibble for us to create something like checkboxes for users to choose which document they want the text to be printed onto.
    Example #1:
    As per customer requests on LC, this text "Bank of ABC" must be printed on ALL documents.
    Example #2:
    As per customer requests on LC, this text "Bank of ABC" must be printed on Billing Invoice, Form D & Form E only.
    So here's the problem with Shipping Documents. The output are totally random, depending on customers request (on the same type of form). Can anyone please advice how to handle this case?
    Thanks in Advance!!

    Hi  ,
    As per your user requirement    check the condition or Set the flags for that
    Otherwise there is alternative node to print the data  in the smartforms .... .
    Try this(if it fits  otherwise  explain little bit clear as your requirement )...
    Let me know if any concerns...

Maybe you are looking for

  • REPORT WITH SALES AND PRODUCTIN INTEGRATION?

    HI,    HERE I NEED TO DISPLAY THE SALES AND PRODUCTION INTEGRATED (FOR MAKE TO STOCK) LIST BY DAY WISE ,I AM NOT ABLE TO FIND THE TABLES FOR THAT. HERE LIST HEADER IS FOLOWING. MATERIAL CODE, MATERIAL DISCRIPTION, PRODUCTION QTY, PROD. VALUE, SALES(B

  • Modifying Flickr album in 3.2.2

    i have gotten a little tricked up with /modifying/ Flickr albums and things seem to have changed slightly in 3.2.2 in the past i would organize /albums/ that contain the images that i want to publish on Flickr and then i would publish these. these wo

  • Share data between built exe:s.

    Hello. How do I share data between two built exe:s ? I now use a global variable between two VI:s and it works exactly as I want. However, when I build the application the communication between the two exe:s is lost. All help appreciated. Real exampl

  • Email in apex

    Hi, I wants to implement email feature in apex database application. I have implemented database application for leave request. My requirement is, when user enter leave details and click on 'apply' button email should send to the approver. Please let

  • Billing Error when trying to renew subscription

    Hey there, So I recieved an email notifiying my that my subscription has been suspeneded due to the inability to bill the credit card on file. First off, nothing has changed with the credit card and everything should be fine to bill so this should no