SAPScript :Header or Window ?

Dear all,
I would like to create a header with three types of paragraph formats standing at the same level.
Shall I create three different windows and line them up with graphic editors or is it possible to do it with the header?
Ex:
name1(format1)      NAME2(format2)   name3(format1)
Regards.
Nozome.

I do not think it is not possible to have more than one paragraph format in the same line in a window. But if you are looking for different font properties then you can use character formats. If there is no other solution, the way you have suggested will work. i.e. placing one window after another in the same line.
Message was edited by: Vinod C

Similar Messages

  • Cannot open Header UDF Window

    Hello,
    At a customer's end, I was creating some UDF and formatted search. After doing this, the header UDF window has stopped opening. There is a note NO. 1539068 saying that this is due to corrupted user preferences. It asks to log a message.
    The customer is still on SAP B1 2007 B PL 09. And not current on AMC. I don't know if support will be resolving this. Would anybody have any idea where and how these user preferences are stored.
    I have checked CPRF table, but it stores only the column preferences, and not the form size, etc. Form size, window position, etc for each user must be stored in some table. Please let me know, if anyone has got any idea about this.
    Regards,
    Rahul Jain

    hi,
    use CTRL + SHIFT + B to display UDF to enter UDF Setting window.
    also from menu bar, Window -->> Cascase
    regards,
    Fidel

  • SAPscript: Header Window : Title Prinitng Issue

    Hi all
      I am modifying  SAPscripting(Z-version).
      On the Header Window, we are printing our Company Name with address.
      Snapshot of the code in this window which I feel not working(was working before) was :
    Z5                <b>Invoice</>
    Z5
    Z7   <b>myCompany<zs>#</> (China) Co., Ltd</>
    /:   INCLUDE ZHEX-MACRO-WWW-XNA_CO_LTD OBJECT TEXT ID ST
    The stmt on Z7 has to print the Company Name with R on the top right of the comp name.  The first Z5 is getting executed and INCLUDE also executes but the stmt of Z7 doesnot.
      I need your help in fixing this issue  !
    Cheers
    RJ
    null

    Z7 is your paragraph format, zs is your character format.
    Z7 will set your text's position in the window, zs is presumably set to display the font as superscript.  It would be worth checking in the SAPscript that both of these are defined as you need.
    Regards,
    Nick

  • Sapscript header

    hi,
    i have a requirements in sapscript that the header of the first page isdifferent in the header of the next pages. My problem is when i change the header of the next page, the first page is also changed.
    Thanks in advance.
    akira

    HI,
    u can create another window for next page  or else u have to change the window type  as  variable window.
    thanks.
    sriram.

  • Main window of SAPScript versus Main window of smartform

    Hi,
    In case of Smartform we have one main window per page but in case of SAP Script we can have 0 to 99 Main window on one page.
    In case of smartform if the main window on one page gets filled then the remaining long text will jump on main window of second page.
    Following are my doubts:
    If I define three MAIN windows for three different kind of long texts on page one in SAP Script as follows:
    MAIN Window 1 -  Long text1
    Main Window 2 -  Long text2
    Main Window 3 -  Long text3
    1) If the long text 1 on MAIN window 1 of first page gets full does it automatically jump to Main Window 2 of first page ?
    2) If I don't want the long text on Main Window 1 to jump on Main window 2 on first page but on Main winodw 1 of next page , is it possible ? How do I do it ?
    Answers will be rewarded..
    Tushar.

    In SAPScripts if the long text is filled in the Main Window it will spill over into the same Main Window if it is defined in the next page. Text from one Main Window will nt spill over onto the text to different Main window.
    So as far as you questions are concerned:
    1. Not it does not automatically jump over into Main Window 2 from Main Window 1 on same page or next page.
    2. You just need to define the Same Main Window on the next page so that text gets jumped over to the next page. If it is possible just define the next page as the same page, so that you do not have to create a separate page and attach all the windows.
    Hope this helps you...
    Shashi Reddy

  • Sapscript, turn the window

    Hallo,
    I have an sapscript, where the pages are in landscape format. In the last page, I want to display the address of the business partner on the back side of the paper, but it must be shown from up to down and not from left to the rigth, because it is used to be displayed in the envelope.
    Wrong:
    abap street 10
    It should be written in the following direction:
    a
    b
    a
    p
    (but the letters in the rigth direction ...
    Thanks a lot,
    marcos

    hi,
    Sometimes you may want to print text vertically. SAPscript itself is not able to print text vertically, but you can inform the printer to do this. To rotate the window during the printing, you need two separate print controls. You have to include the print controls so that they
    enclose the content (text, bar codes, graphics) you want to print vertically.
    The content of the window should have the following structure.
    print-control zm200
      write your text
    print-control zm300
    The print control ZM200 informs the printer to print the following text vertically. The print control ZM300 informs the printer to return to horizontal printing.
    The specific print sequences for the print controls can be found in the documentation of your printer type.
    SAPscript, however, interprets the window’s content as horizontal text. Therefore, if you execute the test printing function in SAPscript, the text will be printed horizontal. To check the printout, you have to print the form starting the print program from the application.
    To print text vertically, perform the following steps in the recommended order:
    1. If necessary, copy a standard printer type
    2. Create the print control that informs the printer to print vertically
    3. Create the print control that informs the printer to return to horizontal printing
    4. Create a new window for vertical printing.
    Make sure that the window does not overlap with other windows or stand out of the page during the printing.
    5. Include the print controls in the new window
    Regards,
    Sailaja.

  • SAPscript last page windows.

    Dear all,
    I would like to shows windows a,b,c on the first page only if the first page is the last one. Otherwise I would like the windows a,b,c are displayed on the last page only. How to proceed?
    Regards.
    Nozome.

    Hi
    I'm not sure the system symbol SAPSCRIPT-FORMPAGES has a value while the sapscript is run, but perhaps only at the end it'll have a value, so your control &PAGE& = &SAPSCRIPT-FORMPAGES& could fail.
    You can try to use the system symbol NEXTPAGE instead of SAPSCRIPT-FORMPAGES, your control'll be:
    IF &NEXTPAGE& = 0
    ENDIF
    You can see the values (at runtime) of system symbols NEXTPAGE and SAPSCRIPT-FORMPAGES by running the sapscript in debug.
    If you can't do any controls you should insert your window in main window.
    max
    Message was edited by: max bianchi

  • SAPScript:  why the window only show the LAST line

    Dears,
    In my form, one of the window only show the LAST line of the it.
    I have set the window enough space,  also when  debuging the program , open_form, write_form,
    all of those sy-subrc = 0.
    both static texts and dynamic texts are set  in the window,   but only the last line shown.
    Anyone could help me?
    Thanks a lot.
    Sincerely,
    Julie Lv

    Hi,
    There are several possibilities to resolve your problem.
    You can work with 2 main windows on in1 page.
    With NEW-WINDOW you switch to the next main-window
    How to use it.
    make an item in main window with that /: NEW-WINDOW command
    if you are ready with first loop call a WRITE_FORM with that NEW-WINDOW statement.
    to cojntinue in the other main.
    Other possibility is. (in case there are not ot many lines)
    Use for every line other variable names.
    Fill these in the loop. And after loop WRITE FORM
    eg. (if maximum is 3 lines)
    &VAR1_1& &VAR1_2& &VAR1_3& &VAR1_4&
    &VAR2_1& &VAR2_2& &VAR2_3& &VAR2_4&
    &VAR3_1& &VAR3_2& &VAR3_3& &VAR3_4&
    Hope this helps.
    Gr., Frank

  • SAPScript: Positioning a Window (Graphic) behind the main window

    Hello,
    I want to print a graphic behind the main window. But I am not able positioning a window or graphic-window behind the main window. The result is that my graphic always shows up in front of the printed text of the main window and not behind the text of the main window, as I wish. I thought that the order of the windows determines which windows is on top? But I am not able of putting a window before the 'MAIN' design window.
    Regards, Lars.

    Hi Lars
    Please check the following thread:
    ABAP Development
    /: BITMAP MYLOGO OBJECT GRAPHICS ID BMAP TYPE BMON
    I think, trick must be in 'TYPE'.
    Try to explore what options you can have (here it is BMON). I will also try.
    Regards
    Ashish Jain

  • Totals in Main Window

    Hi All,
    I want to display the totals of cases,eaches and weight in the last page of the main window.
    I am using Bottom and Endbottom to display the totals.
    I am using the following code in the main window.
    IF &page& eq &sapscript-formpages&
    Bottom
    Endbottom.
    ENDIF
    But the total is printing on each page of the main window.
    It displays the total for that page and adds that amount to the next items on the next page and display the totals.
    I want the whole sum of all the items to be displayed in last page main window.
    I also tried using &nextpage& eq 0
    Please solve my answer.
    Thanks

    Thanks for your reply. Here is the code if the line editor.
    SFORMZMTOCOLL02
    HFORMZMTOCOLL02
    OLANE
    HEADFORM      ZMTOCOLL02      SAP                                                   DEF EPrint transfer order list                         ZMTOCOLL02              00029AGANGULY    46C 20041220120018RCHALASA    640 2006103116381413200072 E0                                                                                100
    LINE/:FORM CPI 10; LPI 6; TAB-STOP 1 CH; START-PAGE FIRST;
    LINE/:FORM FORMAT LETTER LANDSCAPE; PARAGRAPH L; RDI; RDIDEV;
    LINE/:PARAGRAPH B ALIGN BLOCK; LINE-SPACE 1 LN; FONT-SIZE 28;
    LINE/:PARAGRAPH L LINE-SPACE 1 LN;
    LINE/:PARAGRAPH L0 LINE-SPACE 0.80 LN;
    LINE/:PARAGRAPH L1 LINE-SPACE 1 LN;
    LINE/:PARAGRAPH L2 LINE-SPACE 1 LN;
    LINE/:PARAGRAPH L3 LINE-SPACE 0.80 LN;
    LINE/:PARAGRAPH L4 LINE-SPACE 1 LN;
    LINE/:PARAGRAPH L5 LINE-SPACE 1 LN;
    LINE/:PARAGRAPH L6 LINE-SPACE 1 LN;
    LINE/:PARAGRAPH L8 LINE-SPACE 1 LN;
    LINE/:PARAGRAPH L9 LINE-SPACE 1 LN;
    LINE/:PARAGRAPH LC LINE-SPACE 0.80 LN;
    LINE/:PARAGRAPH LH LINE-SPACE 1 LN;
    LINE/:PARAGRAPH LT LINE-SPACE 0.80 LN;
    LINE/:PARAGRAPH LV LINE-SPACE 1 LN;
    LINE/:PARAGRAPH LX LINE-SPACE 0.80 LN;
    LINE/:PARAGRAPH L TAB 1 36 CH LEFT;
    LINE/:PARAGRAPH L0 TAB 1 1 CH LEFT; TAB 2 16 CH LEFT; TAB 3 46 CH CENTER;
    LINE/:PARAGRAPH L0 TAB 4 57 CH CENTER; TAB 5 62 CH LEFT; TAB 6 65 CH LEFT;
    LINE/:PARAGRAPH L0 TAB 7 72 CH LEFT; TAB 8 96 CH RIGHT; TAB 9 100 CH CENTER;
    LINE/:PARAGRAPH L1 TAB 1 38 CH LEFT; TAB 2 75 CH LEFT; TAB 3 90 CH LEFT;
    LINE/:PARAGRAPH L2 TAB 1 40 CH LEFT; TAB 2 90 CM LEFT;
    LINE/:PARAGRAPH L3 TAB 1 1 CH LEFT; TAB 2 16 CH LEFT; TAB 3 46 CH CENTER;
    LINE/:PARAGRAPH L3 TAB 4 57 CH CENTER; TAB 5 62 CH LEFT; TAB 6 65 CH LEFT;
    LINE/:PARAGRAPH L3 TAB 7 77 CH CENTER; TAB 8 91 CH CENTER; TAB 9 100 CH CENTER;
    LINE/:PARAGRAPH L4 TAB 1 5 CH LEFT;
    LINE/:PARAGRAPH L5 TAB 1 40 CH LEFT; TAB 2 42 CH LEFT; TAB 3 46 CH LEFT;
    LINE/:PARAGRAPH L5 TAB 4 57 CH LEFT;
    LINE/:PARAGRAPH L6 TAB 1 5 CH LEFT; TAB 2 7 CH LEFT; TAB 3 40 CH LEFT;
    LINE/:PARAGRAPH L6 TAB 4 42 CH LEFT; TAB 5 46 CH LEFT; TAB 6 57 CH LEFT;
    LINE/:PARAGRAPH L6 TAB 7 75 CH LEFT;
    LINE/:PARAGRAPH L8 TAB 1 20 CH LEFT; TAB 2 42 CH LEFT; TAB 3 55 CH LEFT;
    LINE/:PARAGRAPH L9 TAB 1 20 CH LEFT;
    LINE/:PARAGRAPH LC TAB 1 1 CH LEFT; TAB 2 15 CH LEFT; TAB 3 30 CH LEFT;
    LINE/:PARAGRAPH LC TAB 4 56 CH LEFT; TAB 5 74 CH CENTER; TAB 6 83 CH CENTER;
    LINE/:PARAGRAPH LC TAB 7 90 CH CENTER; TAB 8 97 CH CENTER; TAB 9 101 CH CENTER;
    LINE/:PARAGRAPH LH TAB 1 18 CH LEFT; TAB 2 26 CH LEFT; TAB 3 31 CH LEFT;
    LINE/:PARAGRAPH LT TAB 1 1 CH LEFT; TAB 2 15 CH LEFT; TAB 3 30 CH LEFT;
    LINE/:PARAGRAPH LT TAB 4 56 CH LEFT; TAB 5 74 CH CENTER; TAB 6 83 CH CENTER;
    LINE/:PARAGRAPH LT TAB 7 90 CH CENTER; TAB 8 97 CH CENTER; TAB 9 101 CH CENTER;
    LINE/:PARAGRAPH LV TAB 1 3 CH LEFT; TAB 2 23 CH LEFT; TAB 3 34 CH LEFT;
    LINE/:PARAGRAPH LV TAB 4 55 CH LEFT;
    LINE/:PARAGRAPH LX TAB 1 1 CH LEFT; TAB 2 16 CH LEFT; TAB 3 46 CH CENTER;
    LINE/:PARAGRAPH LX TAB 4 57 CH CENTER; TAB 5 62 CH LEFT; TAB 6 65 CH LEFT;
    LINE/:PARAGRAPH LX TAB 7 72 CH LEFT; TAB 8 96 CH RIGHT; TAB 9 100 CH CENTER;
    LINE/:STRING B BOLD ON;
    LINE/:STRING BC FONT COURIER; FONT-SIZE 12; ULINE ON; MARK OFF; BARCODE BC_EANH;
    LINE/:STRING BD FONT COURIER; FONT-SIZE 72; ULINE ON; MARK OFF; BARCODE ZBC_EANH;
    LINE/:STRING H BOLD ON;
    LINE/:STRING HD FONT COURIER; FONT-SIZE 14; BOLD ON;
    LINE/:STRING U ULINE ON;
    LINE/:WINDOW CUST_WIN TYPE VAR;
    LINE/:WINDOW DETAIL_A TYPE CONST;
    LINE/:WINDOW DETAIL_F TYPE CONST;
    LINE/:WINDOW FUSS TYPE VAR;
    LINE/:WINDOW KOPF TYPE VAR;
    LINE/:WINDOW LAST_3 TYPE VAR;
    LINE/:WINDOW MAIN
    LINE/:WINDOW PICKLOC TYPE VAR;
    LINE/:WINDOW SHP_INST TYPE VAR;
    LINE/:PAGE FIRST NEXT FIRST;
    LINE/:PAGE FIRST MAIN 0 1.97 CH 7.70 CM 27 CM 21.97 LN;
    LINE/:PAGE FIRST WINDOW CUST_WIN 10 CM 3 CM 11 CM 2 CM;
    LINE/:PAGE FIRST WINDOW DETAIL_A 1.97 CH 6 CM 27 CM 4 LN;
    LINE/:PAGE FIRST WINDOW DETAIL_F 1.97 CH 6 CM 27 CM 26.69 LN;
    LINE/:PAGE FIRST WINDOW FUSS 78.74 CH 40.87 LN 28.74 CH 8.27 LN;
    LINE/:PAGE FIRST WINDOW KOPF 1.97 CH 0.94 LN 27 CM 12.76 LN;
    LINE/:PAGE FIRST WINDOW LAST_3 24 MM 14 MM 29 MM 15 MM;
    LINE/:PAGE FIRST WINDOW PICKLOC 19 CM 0.50 CM 7 CM 5 CM;
    LINE/:PAGE FIRST WINDOW SHP_INST 1.97 CH 40.87 LN 76 CH 8.27 LN;
    END
    HEADFORM      ZMTOCOLL02      SAP                                                   TXT EPrint transfer order list                         ZMTOCOLL02              00029AGANGULY    46C 20041220120018RCHALASA    640 2006103116381413200468 E0                                                                                100
    LINE/:FORM TEXT 'Print transfer order list';
    LINE/:PARAGRAPH B TEXT 'Paragr.blocked';
    LINE/:PARAGRAPH L TEXT 'Paragr.flush left';
    LINE/:PARAGRAPH L0 TEXT 'Flush left 1st item line';
    LINE/:PARAGRAPH L1 TEXT 'Flush left header 1st line';
    LINE/:PARAGRAPH L2 TEXT 'Flush left bar code';
    LINE/:PARAGRAPH L3 TEXT 'Flush left 1st item line';
    LINE/:PARAGRAPH L4 TEXT 'Flush left heading 2';
    LINE/:PARAGRAPH L5 TEXT 'Flush left 2nd item line';
    LINE/:PARAGRAPH L6 TEXT 'Flush left 3rd item line';
    LINE/:PARAGRAPH L8 TEXT 'Paragr.footer line';
    LINE/:PARAGRAPH L9 TEXT 'Paragr."Repeat Print"';
    LINE/:PARAGRAPH LC TEXT 'Line Item heading';
    LINE/:PARAGRAPH LH TEXT 'Header data HU elements';
    LINE/:PARAGRAPH LT TEXT 'Line Item heading-2nd line';
    LINE/:PARAGRAPH LV TEXT 'Data of packaging';
    LINE/:PARAGRAPH LX TEXT 'Flush left 1st item line';
    LINE/:STRING B TEXT 'Bold';
    LINE/:STRING BC TEXT 'Bar code EAN-128';
    LINE/:STRING BD TEXT 'Bar code EAN-128 22 mm';
    LINE/:STRING H TEXT 'Character sequence highlighted';
    LINE/:STRING HD TEXT 'Form Heading';
    LINE/:STRING U TEXT 'Character sequence underlined';
    LINE/:WINDOW CUST_WIN TEXT 'Customer Window';
    LINE/:WINDOW DETAIL_A TEXT 'Detail headers';
    LINE/:WINDOW DETAIL_F TEXT 'Detail Box Frame';
    LINE/:WINDOW FUSS TEXT 'Footer text';
    LINE/:WINDOW KOPF TEXT 'List header';
    LINE/:WINDOW LAST_3 TEXT 'Last_3';
    LINE/:WINDOW MAIN TEXT 'Main window';
    LINE/:WINDOW PICKLOC TEXT 'Pick Location Barcode';
    LINE/:WINDOW SHP_INST TEXT 'Shipping Instructions';
    LINE/:PAGE FIRST TEXT 'First page';
    LINE/WDETAIL_A
    LINELC,,Storage,,<B>Material No.</>,,Material Description,,Batch,,Target Qty,,
    LINE= UOM,,T.O. #,,,,STYPE
    LINELC,,Bin,,NDC,,,,SLED,,Cases,,,,
    LINE/*
    LINE/*
    LINE/*,,<b>Material No.</>,,Material Description,,Batch,,S.Item,,,,STYPE,,
    LINE/*Storage,,Target Qty.,,UOM
    LINE/*,,NDC,,,,SLED,,Stk.Cat.,,,,,,Bin,,Cases
    LINE/WDETAIL_F
    LINE/:BOX HEIGHT '1.7' LN
    LINE/*The top line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '2.0' CH YORIGIN '13.5' LN
    LINE/:SIZE WIDTH '104' CH HEIGHT '0' LN
    LINE/:BOX FRAME 10 TW
    LINE/*
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '2.0' CH YORIGIN '17' LN
    LINE/:SIZE WIDTH '104.0' CH HEIGHT '0' LN
    LINE/:BOX FRAME 10 TW
    LINE/*The bottom line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '2.0' CH YORIGIN '40' LN
    LINE/:SIZE WIDTH '104' CH HEIGHT '0' LN
    LINE/:BOX FRAME 10 TW
    LINE/*
    LINE/*The 1st vertical line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '2.0' CH YORIGIN '13.50' LN
    LINE/:SIZE WIDTH '0' CH HEIGHT '26.5' LN
    LINE/:BOX FRAME 10 TW
    LINE/*
    LINE/*The 2nd vertical line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '15.0' CH YORIGIN '13.50' LN
    LINE/:SIZE WIDTH '0' CH HEIGHT '26.5' LN
    LINE/:BOX FRAME 10 TW
    LINE/*
    LINE/*The 3nd vertical line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '30.0' CH YORIGIN '13.50' LN
    LINE/:SIZE WIDTH '0' CH HEIGHT '26.5' LN
    LINE/:BOX FRAME 10 TW
    LINE*
    LINE/*The 4th vertical line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '57.0' CH YORIGIN '13.50' LN
    LINE/:SIZE WIDTH '0' CH HEIGHT '26.5' LN
    LINE/:BOX FRAME 10 TW
    LINE/*
    LINE/*The 5th vertical line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '69.0' CH YORIGIN '13.50' LN
    LINE/:SIZE WIDTH '0' CH HEIGHT '26.5' LN
    LINE/:BOX FRAME 10 TW
    LINE/*
    LINE/*The 6th vertical line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '82.0' CH YORIGIN '13.50' LN
    LINE/:SIZE WIDTH '0' CH HEIGHT '26.5' LN
    LINE/:BOX FRAME 10 TW
    LINE/*
    LINE/*The 7th vertical line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '88.00' CH YORIGIN '13.50' LN
    LINE/:SIZE WIDTH '0' CH HEIGHT '26.5' LN
    LINE/:BOX FRAME 10 TW
    LINE*
    LINE/*The 8th vertical line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '100.00' CH YORIGIN '13.5' LN
    LINE/:SIZE WIDTH '0' CH HEIGHT '26.5' LN
    LINE/:BOX FRAME 10 TW
    LINE*
    LINE/*The 9th vertical line
    LINE/:POSITION PAGE
    LINE/:POSITION XORIGIN '106.00' CH YORIGIN '13.5' LN
    LINE/:SIZE WIDTH '0' CH HEIGHT '26.5' LN
    LINE/:BOX FRAME 10 TW
    LINE*
    LINE/WCUST_WIN
    LINE/:DEFINE &W_NLPLA& = &LTAP-NLPLA&
    LINE/:DEFINE &W_NAME1& := ' '
    LINE/:DEFINE &W_NAME2& := ' '
    LINE/:DEFINE &W_STRAS& := ' '
    LINE/:DEFINE &W_ORT01& := ' '
    LINE/:DEFINE &W_REGIO& := ' '
    LINE/:DEFINE &W_PSTLZ& := ' '
    LINE/:DEFINE &W_KUNNR& := ' '
    LINE/:PERFORM F_CUST_ADRC IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &W_NLPLA&
    LINE/:CHANGING &W_NAME1&
    LINE/:CHANGING &W_NAME2&
    LINE/:CHANGING &W_STRAS&
    LINE/:CHANGING &W_ORT01&
    LINE/:CHANGING &W_REGIO&
    LINE/:CHANGING &W_PSTLZ&
    LINE/:CHANGING &W_KUNNR&
    LINE/:ENDPERFORM
    LINE* Customer No.: &W_KUNNR&
    LINE* &W_NAME1&
    LINE* &W_STRAS&
    LINE* &W_ORT01&, &W_REGIO& &W_PSTLZ&
    LINE/WPICKLOC
    LINE/*>> Define Input and output variables used in different Performs calls
    LINE/:DEFINE &W_LGNUM& := &LTAK-LGNUM&
    LINE/:DEFINE &W_LGTOR& := &LTAK-LGTOR&
    LINE/:DEFINE &W_VBELN& := &LTAK-VBELN&
    LINE/:DEFINE &W_TANUM& := &LTAP-TANUM&
    LINE/:DEFINE &W_OUT_LINE1_BC& := ' '
    LINE/******************************************************************
    LINE/*>> THIS PERFORM CALL IS USED TO GET THE BAR CODE FOR PICK PROCESS
    LINE/*>> Input - Door for warehouse number
    LINE/*>> Input - Sales and distribution document number
    LINE/*<< Output - Line 1
    LINE/******************************************************************
    LINE/:PERFORM F_PICK_PROCESS_BC IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &W_LGNUM&
    LINE/:USING &W_LGTOR&
    LINE/:USING &W_VBELN&
    LINE/:USING &W_TANUM&
    LINE/:CHANGING &W_OUT_LINE1_BC&
    LINE/:ENDPERFORM
    LINE/*<< End of F_PICK_PROCESS_BC  perform cal>>
    LINEL2
    LINEL2
    LINEL2
    LINEL2
    LINEL2
    LINEL2<BD>&W_OUT_LINE1_BC&</>
    LINEL2
    LINEL2
    LINEL2
    LINE/WSHP_INST
    LINE/:DEFINE &W_NLPLA& = &LTAP-NLPLA&
    LINE/:DEFINE &W_PRINT& := ' '
    LINE/:DEFINE &W_VSBED& := ' '
    LINE/:DEFINE &W_VTEXT& := ' '
    LINE/:DEFINE &W_SDABW& := ' '
    LINE/:DEFINE &W_BEZEI& := ' '
    LINE/:DEFINE &W_LINE1& := ' '
    LINE/:DEFINE &W_LINE2& := ' '
    LINE/:DEFINE &W_LINE3& := ' '
    LINE/:DEFINE &W_LINE4& := ' '
    LINE/:DEFINE &W_LINE5& := ' '
    LINE/:PERFORM F_SHIP_INSTRUCTIONS IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING    &W_NLPLA&
    LINE/:CHANGING &W_PRINT&
    LINE/:CHANGING &W_VSBED&
    LINE/:CHANGING &W_VTEXT&
    LINE/:CHANGING &W_SDABW&
    LINE/:CHANGING &W_BEZEI&
    LINE/:CHANGING &W_LINE1&
    LINE/:CHANGING &W_LINE2&
    LINE/:CHANGING &W_LINE3&
    LINE/:CHANGING &W_LINE4&
    LINE/:CHANGING &W_LINE5&
    LINE/:ENDPERFORM
    LINE/:IF       &W_PRINT& NE ' '
    LINE* Shipping Conditions   : &W_VTEXT& &'('W_BEZEI')'&
    LINE/:IF &W_LINE1& NE ' ' OR &W_LINE2& NE ' ' OR &W_LINE3& NE ' ' OR &W_LINE4& NE ' ' OR &W_LINE5& NE ' '
    LINE* Shipping Instructions :
    LINE*     &W_LINE1&
    LINE*     &W_LINE2&
    LINE*     &W_LINE3&
    LINE*     &W_LINE4&
    LINE*     &W_LINE5&
    LINE/:ENDIF
    LINE/:ENDIF
    LINE/WKOPF
    LINE/EKOPF
    LINE/:BITMAP 'Z_LOGO' OBJECT GRAPHICS ID BMAP TYPE BCOL DPI 100
    LINE/*L
    LINE/*L
    LINE/*L
    LINEL ,,<HD>TRANSFER ORDER COLLECTIVE</>
    LINE/*>> Define Input and output variables used in different Performs calls
    LINE/:DEFINE &W_LGNUM& := &LTAK-LGNUM&
    LINE/:DEFINE &W_LGTOR& := &LTAK-LGTOR&
    LINE/:DEFINE &W_VBELN& := &LTAK-VBELN&
    LINE/:DEFINE &W_TANUM& := &LTAP-TANUM&
    LINE/:DEFINE &W_OUT_LINE1_BC& := ' '
    LINE/******************************************************************
    LINE/*>> THIS PERFORM CALL IS USED TO GET THE BAR CODE FOR PICK PROCESS
    LINE/*>> Input - Door for warehouse number
    LINE/*>> Input - Sales and distribution document number
    LINE/*<< Output - Line 1
    LINE/******************************************************************
    LINE/:PERFORM F_PICK_PROCESS_BC IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &W_LGNUM&
    LINE/:USING &W_LGTOR&
    LINE/:USING &W_VBELN&
    LINE/:USING &W_TANUM&
    LINE/:CHANGING &W_OUT_LINE1_BC&
    LINE/:ENDPERFORM
    LINE/*<< End of F_PICK_PROCESS_BC  perform call>>
    LINEL1Door: &W_OUT_LINE1_BC&,,
    LINE/*IF &LTAK-LGTOR& NE ' '
    LINE/*Door: &LTAK-LGTOR&
    LINE/*ENDIF.
    LINEL1Delivery Number: &LTAK-VBELN&
    LINEL2
    LINEL2
    LINEL2
    LINEL2<BC>&LTAK-VBELN&</>,,
    LINE/:IF &LTAK-LGBZO& NE ' '
    LINE= &LTAK-LGBZO&
    LINE/:ENDIF
    LINE/WLAST_3
    LINE/:DEFINE &LAST_3& = ' '
    LINE/:PERFORM LAST_3 IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &LTAK-VBELN&
    LINE/:CHANGING &LAST_3&
    LINE/:ENDPERFORM
    LINEB &LAST_3&
    LINE/WFUSS
    LINE/EFUSS
    LINEL1&RLDRU-WIEDR&  WHS: &LTAK-LGNUM&
    LINE/
    LINE/
    LINE/
    LINE/
    LINE/
    LINE/
    LINE/*>> Define Input and output variables used in to Performs call
    LINE/:DEFINE &W_PAGE_FROM& = ' '.
    LINE/:DEFINE &W_PAGE_TOTAL& = ' '.
    LINE/:DEFINE &W_PAGE_FLAG& = 'N'.
    LINE/:DEFINE &TOT_CASE& = ' '.
    LINE/******************************************************************
    LINE/*>> This perform call is used to Get Consolidated Page No.
    LINE/*>> Input - Reference No., Delivery Document No.
    LINE/*<< Output - Page No., Total Page No., Page Flag
    LINE/******************************************************************
    LINE/:PERFORM F_PAGE_NO IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &LTAK-REFNR&
    LINE/:USING &LTAK-VBELN&
    LINE/:CHANGING &W_PAGE_FROM&
    LINE/:CHANGING &W_PAGE_TOTAL&
    LINE/:CHANGING &W_PAGE_FLAG&
    LINE/:ENDPERFORM
    LINE/*<< End of F_PAGE_NO  perform cal>>
    LINE/*
    LINE/*PERFORM F_TOTALS IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/*USING &W_MATNR&
    LINE/*USING &W_NSOLM&
    LINE/*CHANGING &TOT_CASE&
    LINE/*ENDPERFORM
    LINE/*IF &W_PAGE_FROM& EQ &W_PAGE_TOTAL&
    LINE/*<B>DELIVERY TOTALS</>
    LINE/*<B>CASES:&TOT_CASE&</>
    LINE/*<B>EA,,,,,,:</>
    LINE/*<B>WEIGHT:</>
    LINE/*ELSE
    LINE/*
    LINE/*
    LINE/*
    LINE/*
    LINE/*
    LINE/*ENDIF
    LINE/:IF &W_PAGE_FLAG& EQ 'Y'
    LINEL1&LTAK-BDATU&  Page &W_PAGE_FROM(C)& of &W_PAGE_TOTAL(C)&
    LINE/:ELSE
    LINEL1&LTAK-BDATU&  Page &PAGE& of &SAPSCRIPT-FORMPAGES(C)&
    LINE/:ENDIF.
    LINE/WMAIN
    LINE/*************************************************************************
    LINE/** Caution: Elements KOPF_TA, KOPF_HU, KOPF_TITLE will be print only    *
    LINE/**          on the first page of TO                                     *
    LINE/**          KOPF_HU must be in Window MAIN because of variable number   *
    LINE/**                  of lines.                                           *
    LINE/**          KOPF_TA and KOPF_TITLE have the same structure as           *
    LINE/**                  window KOPF. -> Changes must maintain twice         *
    LINE/*************************************************************************
    LINE/EKOPF_TA
    LINE/:IF  &LTAP-VLBER& EQ '001'
    LINE/:DEFINE &W_VLTYP& := &LTAP-VLTYP&
    LINE/:ELSE
    LINE/:DEFINE &W_VLTYP& := &LTAP-VLBER&
    LINE/:ENDIF
    LINE/EKOPF_HU
    LINE/:IF  &LTAP-VLBER& EQ '001'
    LINE/:DEFINE &W_STYPE& := &LTAP-VLTYP&
    LINE/:ELSE
    LINE/:DEFINE &W_STYPE& := &LTAP-VLBER&
    LINE/:ENDIF
    LINE/EKOPF_TITLE
    LINE/*
    LINE/EMAIN
    LINE/*>> Define Input and output variables used in different Performs calls
    LINE/:DEFINE &W_MAKTX& := &LTAP-MAKTX&
    LINE/:DEFINE &W_MATNR& := &LTAP-MATNR&
    LINE/:DEFINE &W_OUT_LINE1& := ' '
    LINE/:DEFINE &W_OUT_LINE2& := ' '
    LINE/:DEFINE &W_CASEQTY& := ' '
    LINE/:DEFINE &TOT_CASE& := ' '
    LINE/:DEFINE &TOT_EA& := ' '
    LINE/:DEFINE &TOT_EA& := ' '
    LINE/:DEFINE &W_PAGE_FROM& := ' '
    LINE/:DEFINE &W_PAGE_TOTAL& := ' '
    LINE/:DEFINE &W_PAGE_FLAG& := 'N'
    LINE/:DEFINE &W_NSOLM& := &LTAP-NSOLM(T)&
    LINE/:DEFINE &W_TANUM& := &LTAP-TANUM&
    LINE/:DEFINE &W_BRGEW& := &LTAP-BRGEW&
    LINE/******************************************************************
    LINE/*>> This perform call is used to Warp the Material description
    LINE/*>> Input - Material description
    LINE/*<< Output - Line 1 ,Line2
    LINE/******************************************************************
    LINE/:PERFORM F_WORDWRAP_MAKTX IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &W_MAKTX&
    LINE/:CHANGING &W_OUT_LINE1&
    LINE/:CHANGING &W_OUT_LINE2&
    LINE/:ENDPERFORM
    LINE/*
    LINE/*<< End of F_WORDWRAP_MAKTX  perform cal>>
    LINE/**********************************************************************
    LINE/*This perform call is used to fetch the International Article Number(NDC)
    LINE/*From MARA table passing material number as an input parameter
    LINE/*>> Input - Material number
    LINE/*<< Output - International article number
    LINE/**********************************************************************
    LINE/:PERFORM F_GET_NDC IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &W_MATNR&
    LINE/:CHANGING &W_EAN11&
    LINE/:ENDPERFORM
    LINE/*
    LINE/*<< End of F_GET_NDC perform call >>
    LINE/*********************************************************************
    LINE/*This perform is used for Case Quantity Conversion
    LINE/*From MARA table passing material number as an input parameter
    LINE/*>>Input - Material number
    LINE/*<<Output -Case Quantity
    LINE/*********************************************************************
    LINE/:PERFORM F_GET_CASE_QUANTITY IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &W_MATNR&
    LINE/:USING &W_NSOLM&
    LINE/:CHANGING &W_CASEQTY&
    LINE/:ENDPERFORM
    LINE/*<< End of F_GET_CASE_QUANTITY  perform call >>
    LINE/*********************************************************************
    LINE/*>> Page break by Source Storage Type
    LINE/*>> Driver program will return item data sorted by Source Storage Type
    LINE/*
    LINE/*IF  &LTAP-VLBER& EQ '001'
    LINE/*IF        &PAGE& NE 1
    LINE/*IF     &W_VLTYP& NE &LTAP-VLTYP&
    LINE/*DEFINE &W_VLTYP& := &LTAP-VLTYP&
    LINE/*ENDIF
    LINE/*ENDIF
    LINE/*ELSE
    LINE/*IF        &PAGE& NE 1
    LINE/*IF     &W_VLTYP& NE &LTAP-VLBER&
    LINE/*DEFINE &W_VLTYP& := &LTAP-VLBER&
    LINE/*ENDIF
    LINE/*ENDIF
    LINE/*ENDIF
    LINE/*
    LINE/*<< End of code " Page break by Source Storage Type
    LINE/*****************************************************************
    LINE/*<< Print item details
    LINE/******************************************************
    LINELT,,&LTAP-VLPLA&,,<B>&LTAP-MATNR&</>,,&W_OUT_LINE1&,,&LTAP-CHARG&,,
    LINE= <B>&LTAP-NSOLA(C)&</>,,&LTAP-ALTME&,,   &LTAP-TANUM&,,,,
    LINE/:IF  &LTAP-VLBER& EQ '001'
    LINE  &LTAP-VLTYP&
    LINE/:ELSE
    LINE  &LTAP-VLBER&
    LINE/:ENDIF
    LINE/*>>Next line
    LINELC,,&LTAP-NLPLA&,,&W_EAN11&,,&W_OUT_LINE2&,,&LTAP-VFDAT&,,&W_CASEQTY&,,
    LINE= CS,,,,,,
    LINE/:IF  &LTAP-NLBER& EQ '001'
    LINE  &LTAP-NLTYP&
    LINE/:ELSE
    LINE  &LTAP-NLBER&
    LINE/:ENDIF
    LINE/*
    LINE/:PERFORM F_PAGE_NO IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &LTAK-REFNR&
    LINE/:USING &LTAK-VBELN&
    LINE/:CHANGING &W_PAGE_FROM&
    LINE/:CHANGING &W_PAGE_TOTAL&
    LINE/:CHANGING &W_PAGE_FLAG&
    LINE/:ENDPERFORM
    LINE/*
    LINE/*IF &W_PAGE_FROM& EQ &W_PAGE_TOTAL&
    LINE/:PERFORM F_TOTALS IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &W_MATNR&
    LINE/:USING &W_NSOLM&
    LINE/:CHANGING &TOT_CASE&
    LINE/:ENDPERFORM
    LINE/*
    LINE/:PERFORM F_TOTALS_EA IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &W_MATNR&
    LINE/:USING &W_NSOLM&
    LINE/:CHANGING &TOT_EA&
    LINE/:ENDPERFORM
    LINE/*
    LINE/:PERFORM F_TOTALS_WEIGHT IN PROGRAM ZMSPERFORMS_TRANSFER_ORDER
    LINE/:USING &W_TANUM&
    LINE/:USING &W_BRGEW&
    LINE/:CHANGING &TOT_WT&
    LINE/:ENDPERFORM
    LINE/*
    LINE/:IF &PAGE& EQ &SAPSCRIPT-FORMPAGES&
    LINE/:PROTECT
    LINE* <B>,,,,DELIVERY TOTALS</>,,
    LINE/ <B>,,,,CASES:&TOT_CASE&</>
    LINE/ <B>,,,,EA:&TOT_EA&</>
    LINE/ <B>,,,,WEIGHT:&TOT_WT&LBS</>
    LINE/:ENDPROTECT
    LINE/:ENDIF
    LINE/*
    LINE/*,,<b>&LTAP-MATNR&</>,,&W_OUT_LINE1&,,&LTAP-CHARG&,,&LTAP-TAPOS&,,S,,
    LINE/*&LTAP-VLTYP&,,&LTAP-VLPLA&,,<b>&LTAP-NSOLA(C)&</>,,&LTAP-ALTME&
    LINE/*,,&W_EAN11&,,&W_OUT_LINE2&,,&LTAP-VFDAT&,,&LTAP-BESTQ&,,D,,
    LINE/*&LTAP-NLTYP&,,&LTAP-NLPLA&,,&W_CASEQTY&,,CS
    LINE/
    LINE/<<************* End of "Print item details********************>>
    LINE/*
    LINE/*>> Define variable to store Source Storage Type
    LINE/:IF  &LTAP-VLBER& EQ '001'
    LINE/:DEFINE &W_VLTYP& := &LTAP-VLTYP&
    LINE/:ELSE
    LINE/:DEFINE &W_VLTYP& := &LTAP-VLBER&
    LINE/:ENDIF
    LINE/*End of definition
    LINE/*
    LINE/*
    LINE/ESERIAL
    LINE/*
    LINE/EPACKAGING
    LINE/*
    END
    ACTVSAP
    E
    The last Text Elements SERIAL and PACKAGING are not used.
    I need the total of the CASES, Eaches and Weight to be displayed in the last page either in the main window or in the footer.
    Thanks,

  • Send mail/fax/print SAPSCRIPT

    Hi Experts,
    I need to modify SAPSCRIPT in transaction F.64.
    This Layout I need to send as Email/fax/print as per user requirement.
    Could give me sample code tht i need to modify in Print program to achieve the above functionality///.............
    Its Urgent.........Answers will be rewarded...

    Hi,
    For mail attachemnt:
    REPORT Z_SCRIPT .
    DATA: itcpo LIKE itcpo,
    tab_lines LIKE sy-tabix.
    Variables for EMAIL functionality
    DATA: maildata LIKE sodocchgi1.
    DATA: mailpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    DATA: mailbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: mailtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    DATA: mailrec LIKE somlrec90 OCCURS 0 WITH HEADER LINE.
    DATA: solisti1 LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    *PERFORM send_form_via_email.
    FORM SEND_FORM_VIA_EMAIL *
    FORM send_form_via_email.
    CLEAR: maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
    REFRESH: mailtxt, mailbin, mailpack, mailhead, mailrec.
    Creation of the document to be sent File Name
    maildata-obj_name = 'TEST'.
    Mail Subject
    maildata-obj_descr = 'Subject'.
    Mail Contents
    mailtxt-line = 'Here is your file'.
    APPEND mailtxt.
    Prepare Packing List
    PERFORM prepare_packing_list.
    Set recipient - email address here!!!
    mailrec-receiver = 'email.COM'.
    mailrec-rec_type = 'U'.
    APPEND mailrec.
    Sending the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = maildata
    put_in_outbox = ' '
    TABLES
    packing_list = mailpack
    object_header = mailhead
    contents_bin = mailbin
    contents_txt = mailtxt
    receivers = mailrec
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99.
    ENDFORM.
    Form PREPARE_PACKING_LIST
    FORM prepare_packing_list.
    CLEAR: mailpack, mailbin, mailhead.
    REFRESH: mailpack, mailbin, mailhead.
    DESCRIBE TABLE mailtxt LINES tab_lines.
    READ TABLE mailtxt INDEX tab_lines.
    maildata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( mailtxt ).
    Creation of the entry for the compressed document
    CLEAR mailpack-transf_bin.
    mailpack-head_start = 1.
    mailpack-head_num = 0.
    mailpack-body_start = 1.
    mailpack-body_num = tab_lines.
    mailpack-doc_type = 'RAW'.
    APPEND mailpack.
    Creation of the document attachment
    This form gets the OTF code from the SAPscript form.
    If you already have your OTF code, I believe that you may
    be able to skip this form. just do the following code, looping thru
    your SOLISTI1 and updating MAILBIN.
    PERFORM get_otf_code.
    LOOP AT solisti1.
    MOVE-CORRESPONDING solisti1 TO mailbin.
    APPEND mailbin.
    ENDLOOP.
    DESCRIBE TABLE mailbin LINES tab_lines.
    mailhead = 'TEST.OTF'.
    APPEND mailhead.
    Creation of the entry for the compressed attachment
    mailpack-transf_bin = 'X'.
    mailpack-head_start = 1.
    mailpack-head_num = 1.
    mailpack-body_start = 1.
    mailpack-body_num = tab_lines.
    mailpack-doc_type = 'OTF'.
    mailpack-obj_name = 'TEST'.
    mailpack-obj_descr = 'Subject'.
    mailpack-doc_size = tab_lines * 255.
    APPEND mailpack.
    ENDFORM.
    Form GET_OTF_CODE
    FORM get_otf_code.
    DATA: BEGIN OF otf OCCURS 0.
    INCLUDE STRUCTURE itcoo .
    DATA: END OF otf.
    DATA: itcpo LIKE itcpo.
    DATA: itcpp LIKE itcpp.
    CLEAR itcpo.
    itcpo-tdgetotf = 'X'.
    Start writing OTF code
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    form = 'Z08V3_COLLI'
    language = sy-langu
    options = itcpo
    dialog = ' '
    EXCEPTIONS
    OTHERS = 1.
    CALL FUNCTION 'START_FORM'
    EXCEPTIONS
    error_message = 01
    OTHERS = 02.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    window = 'MAIN'
    EXCEPTIONS
    error_message = 01
    OTHERS = 02.
    Close up Form and get OTF code
    CALL FUNCTION 'END_FORM'
    EXCEPTIONS
    error_message = 01
    OTHERS = 02.
    MOVE-CORRESPONDING itcpo TO itcpp.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    result = itcpp
    TABLES
    otfdata = otf
    EXCEPTIONS
    OTHERS = 1.
    Move OTF code to structure SOLI form email
    CLEAR solisti1. REFRESH solisti1.
    LOOP AT otf.
    solisti1-line = otf.
    APPEND solisti1.
    ENDLOOP.
    ENDFORM
    For FAx Attaxhment:
    REPORT RSKSENDF MESSAGE-ID SK.
    Test report to send a test fax
    sends a fax to the number <TO_CNTRY>-<TO_NMBER>
    containing an automatically generated message text.
    TABLES: USR03.
    PARAMETERS: TO_CNTRY LIKE T005-LAND1 OBLIGATORY,
    TO_NMBER LIKE TSP01-RQTELENUM OBLIGATORY,
    FROM_USR(30) TYPE C DEFAULT SY-UNAME,
    TO_RECIP(30) TYPE C DEFAULT SY-UNAME.
    SAPscript content ITAB
    DATA: BEGIN OF TEST_DOC OCCURS 10.
    INCLUDE STRUCTURE TLINE.
    DATA: END OF TEST_DOC.
    SAPscript header struct
    DATA BEGIN OF HEADER.
    INCLUDE STRUCTURE THEAD.
    DATA END OF HEADER.
    INITIALIZATION.
    get county from user addres in usr03
    system->user profile->user address
    check if not empty
    SELECT SINGLE * FROM USR03 WHERE BNAME = SY-UNAME.
    IF SY-SUBRC = 0 AND USR03-LAND1 <> SPACE.
    TO_CNTRY = USR03-LAND1.
    ENDIF.
    START-OF-SELECTION.
    PERFORM FILL_UP_TEST_DOC.
    PERFORM SHOW_TEST_DOC.
    AT PF08.
    PERFORM SEND_FAX TABLES TEST_DOC USING TO_CNTRY
    TO_NMBER.
    AT SELECTION-SCREEN ON TO_NMBER.
    PERFORM CHECK_NUMBER USING TO_CNTRY TO_NMBER.
    *& Form CHECK_NUMBER
    FORM CHECK_NUMBER USING
    COUNTRY
    NUMBER.
    DATA: SERVICE LIKE TSKPA-SERVICE VALUE 'TELEFAX',
    LEN LIKE SY-FDPOS.
    FIELD-SYMBOLS <P>.
    windows GUI push the ? from mandatory input instead
    of overwriting it
    LEN = STRLEN( TO_NMBER ).
    IF LEN > 1.
    SUBTRACT 1 FROM LEN.
    ASSIGN TO_NMBER+LEN(1) TO <P>.
    IF <P> = '?'.
    <P> = SPACE.
    ENDIF.
    ENDIF.
    official check FM
    CALL FUNCTION 'TELECOMMUNICATION_NUMBER_CHECK'
    EXPORTING
    COUNTRY = COUNTRY
    NUMBER = NUMBER
    SERVICE = SERVICE.
    on old 21?/22? release you may have to handle the
    exception
    because the Function uses RAISE instead of
    MESSAGE... RAISING....
    ENDFORM. " CHECK_NUMBER
    *& Form FILL_UP_TEST_DOC
    fills test text in itab TEST_DOC *
    real life example needs to get real life data *
    FORM FILL_UP_TEST_DOC.
    DATA: DATUM(12) TYPE C,
    UZEIT(10) TYPE C.
    SAPscript initialization
    of course, you may want to set a few parameter
    (FORM,LAYOUT,....)
    CALL FUNCTION 'INIT_TEXT'
    EXPORTING
    ID = 'ST '
    LANGUAGE = SY-LANGU
    NAME = 'FOO-BAR'
    OBJECT = 'TEXT'
    IMPORTING
    HEADER = HEADER
    TABLES
    LINES = TEST_DOC
    EXCEPTIONS
    OTHERS = 1.
    IF SY-SUBRC <> 0.
    MESSAGE A400 WITH 'INIT_TEXT'.
    ENDIF.
    PERFORM ADD_EMPTY_LINE.
    WRITE: SY-DATUM TO DATUM.
    WRITE: SY-UZEIT TO UZEIT.
    PERFORM ADD_LINES USING 'This is test Telefax'(001)
    DATUM UZEIT.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING 'From: &'(002) FROM_USR SPACE.
    PERFORM ADD_LINES USING 'To: &'(003) TO_RECIP SPACE.
    PERFORM ADD_LINES USING 'Fax number: & &'(004)
    TO_CNTRY TO_NMBER.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING
    'This is a test fax send by Report RSKSENDF'(005)
    SPACE SPACE.
    PERFORM ADD_LINES USING 'on SAP system & '(006)
    SY-SYSID SPACE.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING
    'the quick brown fox jumps over the lazy dog.'(101)
    SPACE SAPCE.
    PERFORM ADD_LINES USING
    'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'(102)
    SPACE SAPCE.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING 'End of test'(007) SPACE
    SPACE.
    ENDFORM. " FILL_UP_TEST_DOC
    *& Form ADD_LINES
    printf a line an appends it in test_doc *
    --> cformat format.
    --> p1 param1
    --> p2 param2
    FORM ADD_LINES USING CFORMAT P1 P2.
    TEST_DOC-TDFORMAT = '/'.
    TEST_DOC-TDLINE = CFORMAT.
    IF TEST_DOC-TDLINE CA '&'.
    REPLACE '&' WITH P1 INTO TEST_DOC-TDLINE.
    IF TEST_DOC-TDLINE CA '&'.
    REPLACE '&' WITH P2 INTO TEST_DOC-TDLINE.
    ENDIF.
    ENDIF.
    APPEND TEST_DOC.
    ENDFORM. " ADD_LINES
    *& Form ADD_EMPTY_LINE
    appends an empty line to test_doc *
    FORM ADD_EMPTY_LINE.
    TEST_DOC-TDFORMAT = '/'.
    CLEAR TEST_DOC-TDLINE.
    APPEND TEST_DOC.
    ENDFORM. " ADD_EMPTY_LINE
    *& Form SHOW_TEST_DOC
    lists the test doc for aproval *
    *>>>> this is for fun only because PRINT_TEXT also
    offers a preview *
    FORM SHOW_TEST_DOC.
    FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
    WRITE: / 'Test fax would look like this:'(020).
    ULINE.
    SKIP.
    LOOP AT TEST_DOC.
    IF TEST_DOC-TDLINE <> SPACE.
    WRITE:/ TEST_DOC-TDLINE.
    ELSE.
    SKIP.
    ENDIF.
    ENDLOOP.
    SKIP.
    ULINE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE: 'Press PF8 to send it'(021).
    ENDFORM. " SHOW_TEST_DOC
    *& Form SEND_FAX
    send fax by calling SAPscript *
    Note: Instead of using PRINT_TEXT you may also *
    call OPEN_FORM / WRITE_FORM_LINES / CLOSE_FORM, *
    this allows you to use a similar program structure *
    as with NEW-PAGE PRINT ON / WRITE / NEW-PAGE PRINT
    OFF *
    FORM SEND_FAX
    TABLES DOC2FAX STRUCTURE TEST_DOC
    USING COUNTRY
    NUMBER.
    DATA: SID(5) TYPE N.
    DATA BEGIN OF POPT.
    INCLUDE STRUCTURE ITCPO.
    DATA END OF POPT.
    DATA BEGIN OF PRES.
    INCLUDE STRUCTURE ITCPP.
    DATA END OF PRES.
    CLEAR POPT.
    POPT-TDCOPIES = 1. " one copy
    POPT-TDDEST = " done internaly by script,
    POPT-TDPRINTER = " do not fill !!!
    POPT-TDNEWID = 'X'. " do not reuse old spool request
    POPT-TDDATASET = 'TEST'(022). " fill as you want
    POPT-TDSUFFIX1 = 'FAX'(023). " fill as you want
    POPT-TDSUFFIX2 = SY-UNAME. " fill as you want
    POPT-TDIMMED = 'X'. " send now
    POPT-TDLIFETIME = 8. " keep 8 days in spool
    POPT-TDTELENUM = NUMBER. " number without country code
    POPT-TDTELELAND = COUNTRY. " country of recipient
    POPT-TDCOVER = 'test fax'(024).
    POPT-TDCOVTITLE = 'test fax'(024).
    POPT-TDIEXIT = 'X'.
    CALL FUNCTION 'PRINT_TEXT'
    EXPORTING
    APPLICATION = 'TX'
    ARCHIVE_INDEX = ' '
    ARCHIVE_PARAMS = ' '
    DEVICE = 'TELEFAX' "<<< here we say: fax it !
    DIALOG = 'X'
    HEADER = HEADER
    OPTIONS = POPT
    IMPORTING
    RESULT = PRES
    TABLES
    LINES = DOC2FAX
    EXCEPTIONS
    OTHERS = 01.
    do not bother with exception in sample code
    CANCELED = 01
    DEVICE = 02
    FORM = 03
    OPTIONS = 04
    UNCLOSED = 05
    UNKNOWN = 06
    FORMAT = 07
    TEXTFORMAT = 08
    EXTERNAL = 09.
    IF SY-SUBRC = 0.
    arriving here means we could send:
    SID = PRES-TDSPOOLID.
    IF SID > '00000'.
    MESSAGE S433 WITH SID.
    ENDIF.
    LEAVE .
    ELSE.
    do not bother with exception in sample code
    MESSAGE A400 WITH 'PRIN_TEXT'.
    ENDIF.
    ENDFORM. " SEND_FAX
    TESTING:
    You can check with the transactions SOST or SOSB to monitor the outputs sent out from SAP.
    Regards,
    Shiva Kumar

  • Creating a Custom SAPscript Editor

    I am trying to create a custom SAPscript editor and I'm having problems. We are on SAP 640.
    We use texts to store notes against invoices recording details of the dunning process. Our users have ask if we can tailor the notes so that users can insert new notes against an invoice but not update or delete old notes. I have tried to do this by creating a custom editor EDIT_TEXT_FORMAT_XXXXX where XXXXX is ZGTENO a text format that has been set up against text object BELEG. Unfortunately the new module is never called.
    For most text objects SAP picks up the text format  and moves it into the SAPscript header and this field in the SAPscript  header is used to call the custom editor. For example in program sapfv45t include FV45TFDB_TTXER_SELECT_CREDM   text format is in gt_tdtexttype or lv_tdtexttype  one of these fields is then moved into the SAPscript header field xthead-tdtexttype which is used in function group STXD function module EDIT_TEXT (the field is in chead-tdtextline) to decide whether to call the standard editor (function FULL_SCREEN_NEW) or a custom editor but for text object BELEG it gets the text format but never moves it to the SAPscript header (for example see program sapfv45t include FV45TFDB_TTXER_SELECT_BELEG it gets the text format in lv_tdtexttype but doesn't move it to xthead-tdtexttype so it can't be used to call a custom editor) so it looks as if a custom editor cannot be used with text object BELEG, is this correct or am I missing something?
    I can see my new text format ZGTENO being picked up in the debugger but because it isn't moved into the SAPscript header it doesn't call my function module, it always calls the standard editor.

    Two days after you posting you original question: http://forum.java.sun.com/thread.jspa?threadID=651625&messageID=3831712
    you find the answer on your own. Yes, the general Java forum sure is helpfull.
    If the question was posted in the Swing forum you would have had the answer in a couple of hours:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=637581

  • How to create a text editor, the one like header text in PO

    Dear Ones,
    My requirement is that I want to create a text editor for storing terms and condition plant wise.
    The editor should be the one like header text in PO. It can take end number of lines.
    I created the text object ('TERMS') in table ttxob and text for it in table ttxot.
    Also created text id ('L000' and 'L001') in table ttxid and text for it in table ttxit.
    Now using FM read_text, save_text and edit_text, I have written a program but it does not save the data.
    When I run the program initially it displays me blank, then I enter some data into it. Again when I come back it displays the data and also saves the edition. But if I close my session the data is gone.
    It means it is not actually saving the data in database. My code is as below:
    *& Report ZAK_TEXT_EDITOR
    REPORT zak_text_editor.
    DATA : head TYPE STANDARD TABLE OF thead WITH HEADER LINE,
           line TYPE STANDARD TABLE OF tline WITH HEADER LINE.
    DATA : tdname TYPE thead-tdname.
    SELECTION-SCREEN : BEGIN OF BLOCK blk WITH FRAME TITLE text-001.
    SELECTION-SCREEN : SKIP 1.
    PARAMETERS       : id TYPE thead-tdid OBLIGATORY
                               MATCHCODE OBJECT zak_textid.
    SELECTION-SCREEN : SKIP 1.
    SELECTION-SCREEN : END OF BLOCK blk.
    START-OF-SELECTION.
      CONCATENATE 'TERMS' id INTO tdname.
      head-tdobject   = 'TERMS'.
      head-tdname     = tdname.
      head-tdid       = id.
      head-tdspras    = sy-langu.
      head-tdlinesize = 132.
      APPEND head.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                        = sy-mandt
          id                            = id
          language                      = sy-langu
          name                          = tdname
          object                        = 'TERMS'
        ARCHIVE_HANDLE                = 0
        LOCAL_CAT                     = ' '
      IMPORTING
        HEADER                        =
        TABLES
          lines                         = line
       EXCEPTIONS
         id                            = 1
         language                      = 2
         name                          = 3
         not_found                     = 4
         object                        = 5
         reference_check               = 6
         wrong_access_to_archive       = 7
         OTHERS                        = 8.
      IF sy-subrc <> 0.
        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            client                = sy-mandt
            header                = head
          INSERT                = ' '
          SAVEMODE_DIRECT       = ' '
          OWNER_SPECIFIED       = ' '
          LOCAL_CAT             = ' '
        IMPORTING
          FUNCTION              =
          NEWHEADER             =
          TABLES
            lines                 = line
         EXCEPTIONS
           id                    = 1
           language              = 2
           name                  = 3
           object                = 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.
      ENDIF.
      CALL FUNCTION 'EDIT_TEXT'
        EXPORTING
        DISPLAY             = ' '
        EDITOR_TITLE        = ' '
          header              = head
        PAGE                = ' '
        WINDOW              = ' '
          save                = 'X'
        LINE_EDITOR         = ' '
        CONTROL             = ' '
        PROGRAM             = ' '
        LOCAL_CAT           = ' '
      IMPORTING
        FUNCTION            =
        NEWHEADER           =
        RESULT              =
        TABLES
          lines               = line
       EXCEPTIONS
         id                  = 1
         language            = 2
         linesize            = 3
         name                = 4
         object              = 5
         textformat          = 6
         communication       = 7
         OTHERS              = 8.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

    CONSTANTS:
      line_length TYPE i VALUE 254.
    DATA: ok_code LIKE sy-ucomm.
    DATA:
    Create reference to the custom container
      custom_container TYPE REF TO cl_gui_custom_container,
    Create reference to the TextEdit control
      editor TYPE REF TO cl_gui_textedit,
      repid LIKE sy-repid.
    START-OF-SELECTION.
      SET SCREEN '100'.
          MODULE USER_COMMAND_0100 INPUT                                *
    MODULE user_command_0100 INPUT.
    CASE ok_code.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
    The TextEdit control should only be initialized the first time the
    PBO module executes
      IF editor IS INITIAL.
        repid = sy-repid.
      Create obejct for custom container
        CREATE OBJECT custom_container
          EXPORTING
            container_name              = 'MYCONTAINER1'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            others                      = 6
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      Create obejct for the TextEditor control
        CREATE OBJECT editor
          EXPORTING
             wordwrap_mode          =
                    cl_gui_textedit=>wordwrap_at_fixed_position
             wordwrap_position      = line_length
             wordwrap_to_linebreak_mode = cl_gui_textedit=>true
            parent                  = custom_container
          EXCEPTIONS
            error_cntl_create      = 1
            error_cntl_init        = 2
            error_cntl_link        = 3
            error_dp_create        = 4
            gui_type_not_supported = 5
            others                 = 6
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT

  • Error installing iTunes 10 on Windows 7 64 Bit

    I upgraded to Windows 7 from XP since I changed laptop. I did tried to install iTunes on this new machine (win 7 64 bit Corei7 processor and 4G RAM) but during the installation when the status screen states "Publising Product Information", I'm getting the following error message:
    "An error occurred during the installation of assembly 'Microsoft.VC80.CRT,version="8.0.50727.4053",type="win32",publicKeyToken='1fc8b 3b9a1e18e3b",processorarchitecture="x86". Please refer to Help and Support for more information. HRESULT:0x800736FD."
    Following this message, the installer reverses the installation process and after a 10-15 minute wait, a screen comes up that says the Itunes installation was complete. Obviously it wasn't but that is what the message says. When you close out of that message, Itunes tries to start and this message pops up:
    "Apple Application Support was not found.
    Apple Application Support is required to run iTunes. Please uninstall itunes, then install iTunes again.
    Error 2"
    Any help will be very much appreciated

    HRESULT:0x800736FD
    It's rarer to see these on Windows 7 than it is on Vista. Somtimes they're a bit easier to deal with on 7, too.
    First, head to Windows Update and see if you can update the PC. If you can, and you collect updates without any errors, try another iTunes install.
    If you get errors installing Windows Updates, double click on the failed updates in your Update history to bring up a small window containing alphanumeric codes for the erros. Are they also 800736FDs, or are you getting other error codes?

  • Error when installing itunes 10 on windows 7 64 bit

    why do I keep n getting the error messages when i try and install itunes on windows 7 64 bit. But sometimes it will install but once it gets done it say that something is not install I need to uninstall and reinstall itunes..... is there something I need to do to get this to work....

    HRESULT:0x800736FD
    It's rarer to see these on Windows 7 than it is on Vista. Somtimes they're a bit easier to deal with on 7, too.
    First, head to Windows Update and see if you can update the PC. If you can, and you collect updates without any errors, try another iTunes install.
    If you get errors installing Windows Updates, double click on the failed updates in your Update history to bring up a small window containing alphanumeric codes for the erros. Are they also 800736FDs, or are you getting other error codes?

Maybe you are looking for

  • First 4 seconds of video weird behavior

    New problem. Recorded a Keynote movie and exported to QT. The KN plays normally. The QT audio starts but the video begins 4 seconds later. When I look only at the video it starts 4 sec. late. BUT when I drag the selector over the first 4 seconds the

  • Cascade delete in container or database schema?

    I am creating a database schema which I want to map EJB CMP Entity Beans onto. There are a number of relationships in the schema where I want to cascade deletion if a parent record is deleted and a number of relationships where I want to prevent dele

  • HT4061 My iPhone 4 will not restore.

    My iPhone 4 will not restore.  It displays a picture of a USB cable with an arrow indicating I need to connect to iTunes.  iTunes sends me codes 1603 or 1604.  I follow the instructions and get the same result. Is there anything else I should do?

  • HELP how to install OSX on power book ge prismo running OS 9.2

    HELP how to install OSX on powerbook G3 prismo running OS 9.2  help.

  • How can I use Private browsing alongside already open regular browsing window?

    ''Duplicate post, continue here - [https://support.mozilla.com/en-US/questions/816143]'' Hi, Whenever I start Private browsing, all the tabs and windows which are already open closes and then the Private browsing window opens. All the tabs and window