Small doubt on displaying variables in sap script

HI all,
Can anyone let me know if i am in the correct way or not.
i'm modifying one existing script. to display some data in the script i am doing like this :
get the data into itab.
loop at itab into wa.
call FM write_form
   element = 'TEXT'.
endloop.
in the layout i am using this elements and variables
/E TEXT
S1 <D1>&WA-FIELD1&</> <D1>&WA_FIELD2&</>
but the work in not having any data in the layout whereas before call write_form its having data.
can anyone suggest me who to deal with this.
thanks

You can check if your SAPScript is able to talk with the driver program.
In SE71
Open in Change Mode
Form > Check > Text
Select the Include Res checkbox .. Press Enter
Enter your Program in the Next popup by "Append Print Program"
Now, press Copy.
It will show you the errors.
In your proram WA must a in TOP include or Globally declared.
Regards,
Naimesh Patel

Similar Messages

  • Displaying variable in sap-script

    Hi folks,
           I need to pass a variable to an existing sap-script. But that window is not calling form the print program. It just called dynamically, which contains current date and time. In that window i need to pass the variabe. But the value to the variabel is coming from the print program. How can i pass this variable to the script now...pls help me.
            Thanks,
            Shyam.

    Hi
    Create the window and pass these system symbols
    &date&
    &time&.
    Regards,
    Sravanthi

  • HOW TO CREATE A VARIABLE IN SAP SCRIPT

    HI ALL,
    CAN ANYONE TELL ME HOW TO CREATE A VARIABLE IN SAP SCRIPT.
    THANK YOU,
    BYE
    TAKE CARE.

    Hi Ravi,
    You can use like this
    A text in the editor contains the following DEFINE commands:
    /: DEFINE &mysymbol& = 'xxx xxx xxxxx xxxx'
    &mysymbol&
    /: DEFINE &mysymbol& = 'yyyyy yyy yyyy'
    / &mysymbol&
    The printed text appears

  • Issue in New Page Display in a SAP Script

    Hi All
             I have applied a line count logic in my SAP script, such that if lines are more than 32, Sub Total is displayed on this page(Sub Total needs 4 lines to display) and from next page,another heading starts. (Total around 39 lines can be displayed  in one page)
    Sub Total Text contains 2 lines of text, and 2 blank lines after it (Total 4 lines)
    Now, if number of lines is around 36, Sub Total, doesnt fully display in this page and the 2 blank lines gets passed to the next page. And I am also firing a new page from my code. As a result, the 2nd page comes fully blank and the data is now being displayed at the 3rd page. How can I prevent the 2nd page from coming blank ??
    I am using Function Module 'CONTROL_FORM' (or WRITE_FORM) to fire a new page.
    I do not want to apply a line count logic for this as this wont be fool proof !!
    I hope I have made the issue clear. Kindly help !!
    Thanks
    KP

    Hi,
    otherwise u can do one thing: U call the PERFORM in the SCRIPT FORM passing the &PAGE&(Contains the current Page No) value to it. take a loal variable and pass the PAGE value to the local variable and check for every line whether both &PAGE& & local varaiable are same, if not then set the FLAG value to 'X' (it means the new page has triggered).
    Eg:
    In Script:
    /:  lv_tabix = lv_tabix + 1.
    /: PERFORM new_page_flag IN PROGRAM ZXXXXX
    /: USING &PAGE&
    /: USING &lv_tabix&
    /: CHANGING &FLAG&
    In ZXXXXX Program:
    FORM new_page_flag USING int_tab STRUCTURE itcsy
                                CHANING out_tab STRUCTURE itcsy.
    data : lv_page TYPE i,
             lv1_tabix TYPE i.
    READ TABLE int_tab WITH KEY name = 'LV_TABIX'.
    IF sy-subrc EQ '0'.
      lv1_tabix = int_tab-value.
      clear : int_tab.
    ENDIF.      
    IF lv1_tabix EQ '1'.
      lv_page = '1'.
    ENDIF.
    READ TABLE int_tab WITH KEY name = 'PAGE'.
    IF lv1_tabix GT '1'.
      IF lv_page NE  int_tab-value.
        READ TABLE out_tab WITH KEY name = 'FLAG'.
        IF sy-subrc EQ 0.
           out_tab-value = 'X'.
           MODIFY out_tab.
           clear : out_tab.
        ENDIF.
      ENDIF.
    ENDIF.
    IF sy-subrc EQ '0'.
      lv_page = int_tab-value.
    ENDIF.                          
    Hope it helps!!
    Rgds,
    Pavan

  • The next page in not displaying in the SAP Script

    Hello,
    I had one SAP script. There were two pages in the script and i mentioned the next page also for the FIRST and NEXT page as
    First - next page --> next
    and next -- next page --> next
    Now, I am having 3 items which needs to be gets displayed using SAP script.
    The first two items displayed properly but the third item is not getting displayed, as of the size of main window is small.
    Whenver i am increasing the size of main window the third item gets displayed propely.
    But i guess whenever the data will get overflow in main window then it should gets displayed in the next page, this is not happening in my case.
    Can any one tell me, how to display the next page whenver the data will get overflow in main window?
    Please help me with this.
    Thanks in advance
    Regards,
    Darshana

    Hi Darshana,
    if you use text element for the item output, you will need same text element on NEXT page. Check for Typos. Switch on sapscript debugger and check what happens.
    Regards,
    Clemens

  • Drawing Table & Displaying Data in SAP Script : Data Alignment probelm

    Hi Experts,
    I am Developing An SAP Script in Which Had to Display Data in a Table with Three column & multiple rows, i had created the Table using BOX Command in SAP SCRIPT & assigned a TEXT Element to it & calling this text element while Looping in WRITE_FORM FM.but while displaying DATA in One column the data in another columns shift to the right & if the data in 1st column is less the data in the second column shift to the left. i know these issues had been covered in the past but i am not getting any concrete results from searching in the forum.
    Also On more problem when ever i am declaring a text element in some other window & also giving the Command BOX inside it to draw outline the BOX is not drawn.
    This seem to be an alignment issue . Experts Please provide me with some alternative.
    Thanks & Regards
    Priyesh Shah

    Hi ,
    To stop columns going left and right.Use number of position in the variable .Like fix the lenght &name(10)&.Here name can print 10 characters.
    For box not appearing in other window check the box command parameters .It will draw.Not a alignment problum.

  • Text display issue in SAP script

    Hi All,
    I have developed a sap script (Invoice) which is having a Footer window.
    The footer window should display page number and some text (address of company). The address data is stored in an internal table and the same will be made to display in sap script.
    Now my problem is the address data is displaying correctly in the second page. But no data is getting displayed in the first page. If the Invoice is of single page, the address data in Footer window is getting printed properly.
    The problem occurs only, when the invoice is of multiple pages....
    What might be the problem in this regard...??????
    Please help me, as this bug need to be fixed as early as possible....
    Regards
    Pavan

    The size of MAIN and FOOTER window are not getting truncated. Both window have designed properly.
    In the first page, the footer window will display Page No data and the address data will be invisible. In debig mode, i can see the value of address will be passed to text symbols of sap script.
    There are no conditions set in the sap script for Footer window.
    one more observation is that after execution (at print preview screen), if i go back and again click for print preview, the address data is getting printed in the first page...!!!
    Regards
    Pavan

  • Variable in SAP SCRIPT

    Hi Guys,
    I want to print a variable Value from Print Program to SAP SCRIPT, I tried to print it in between && but they still dont have any value while debugging SAP SCRIPT and not also in print out....Suggest somthing.
    Cheers....!!
    Sid

    Hi,
         Debug your program and c whether you are getting your value there. If yoes, check if you have used the function module OPEN_FORM and passed the correct name of the SAP script. Then check if you have used Write_Form and are you passing the correct Text Element Name.
    You would  not have used one of them. Hence the problem.
    Check and revert back.
    Thanks
    Nayan

  • How to find length of a character variable in sap script

    Hi,
    I have stored a line of text in one variable. If the text exceeds more than 50 characters, the remaining characters will be printed in next line.
    For this i have given code as :
    <I>&S_BOL_SUMMARY-TXT(50)&</>
    <I>&S_BOL_SUMMARY-TXT+50&</>
    The problem is i have to print the second line only when the text exceeds more than 50 characters. So how can i give the condition for that?
    Ezhil

    Hi,
    Try the following,
    data: len type i.
    len = strlen (S_BOL_SUMMARY-TXT ).
    if len > 50.
    &S_BOL_SUMMARY-TXT(50)&
    &S_BOL_SUMMARY-TXT+50&
    else.
    &S_BOL_SUMMARY-TXT(50)&
    endif.

  • Dump error when clicked on text elements in SAP Script window

    Hi All,
    There is an inclusion in SAP Script. I have written the code in driver program. I need to pass the value to SAP Script in the requested position. But when I go to SE71 > Form Name > Change or Display > MAIN Window > Text Elements > I get a dump error.
    Category               ABAP Programming Error
    Runtime Errors         DATA_LENGTH_TOO_LARGE
    Except.                CX_SY_RANGE_OUT_OF_BOUNDS
    ABAP Program           SAPLSTXK
    Application Component  BC-SRV-SCR
    Date and Time          30.04.2014 20:00:08
    Short text
         Invalid partial field access: Length is too large
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "SAPLSTXK" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
         Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_RANGE_OUT_OF_BOUNDS', was not
          caught in
         procedure "TOKEN_COMMENT" "(FORM)", nor was it propagated by a RAISING clause.
         Since the caller of the procedure could not have anticipated that the
         exception would occur, the current program is terminated.
        The reason for the exception is:
        In the executed program "SAPLSTXK", the system attempted to access the field
        "ITF_TOKEN" of the type "C" and with the length 255 using the length 272.
        However, a partial field access with a length specification that is
        larger than the field length is not allowed.
    How to correct the error
        Reduce the length used to access the field.
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "DATA_LENGTH_TOO_LARGE" "CX_SY_RANGE_OUT_OF_BOUNDS"
        "SAPLSTXK" or "LSTXKFRN"
        "TOKEN_COMMENT"
        If you cannot solve the problem yourself and want to send an error
        notification to SAP, include the following information:
        1. The description of the current problem (short dump)
           To save the description, choose "System->List->Save->Local File
        (Unconverted)".
        2. Corresponding system log
           Display the system log by calling transaction SM21.
           Restrict the time interval to 10 minutes before and five minutes
        after the short dump. Then choose "System->List->Save->Local File
    2937 * todo empty comment ???
    2938       if g_tm_open    eq true or     " Section
    2939          g_tm_b_close eq true.
    2940         l_token = '\chcbpat0'.
    2941         l_len = strlen( l_token ).
    2942         token_control = true.
    2943         assign l_token to <itf1>.
    2944         perform put_itf1_new using l_len.
    2945         perform token_line_begin changing l_next_token.
    2946       else.                          " without section
    2947         concatenate '\chcbpat0\line' g_cf_string l_cbpat_token into l_token.
    2948         l_len = strlen( l_token ).
    2949         token_control = true.
    2950         assign l_token to <itf1>.
    2951         perform put_itf1_new using l_len.
    2952       endif.
    2953     elseif l_next_token-code eq ')L'.         " \par
    2954       l_token = '\par'.
    2955       l_len = strlen( l_token ).
    2956       token_control = true.
    2957       assign l_token to <itf1>.
    2958       perform put_itf1_new using l_len.
    2959     elseif l_next_token-code eq '(C' or       " \par + format
    2960            l_next_token-code eq ')C' or
    2961            l_next_token-code eq '(&' or
    2962            l_next_token-code eq 'TA' or
    2963            l_next_token-code eq 'SC' or
    2964            l_next_token-code eq 'ST'.
    2965       concatenate '\chcbpat0\par' g_pf_string g_cf_string l_cbpat_token into l_token.
    2966       l_len = strlen( l_token ).
    >>>>>       itf_token(l_len) = l_token.
    2968       token_control = true.
    2969       assign l_token to <itf1>.
    2970       perform put_itf1_new using l_len.
    2971     endif.
    2972
    2973 * Step 7: (L to disarm
    2974   if g_compose eq true and
    2975      l_next_token-code eq '(L'.
    2976     perform read_next_itf_token(rstxscan) using p_token.
    2977   endif.
    2978
    2979 ENDFORM.                    " token_comment
    2980 *&---------------------------------------------------------------------*
    2981 *&      Form  create_lang_info
    2982 *&---------------------------------------------------------------------*
    2983 *       add default language to rtf
    2984 *----------------------------------------------------------------------*
    2985 *      -->P_HEADER  text
    2986 *      <--P_RESULT  text
    How do I open the text elements? I need to pass the variable inside SAP Script.
    Please Help. The requirement is pending from very long. Not able to rectify this issue.
    Regards,
    Rekha

    Hi,
    There is a SAP Note about this problem
    566794 - Runtime error: STRING_OFFSET_TOO_LARGE during conversion
    Correction Instructions
    Correction Instructions
    Software Component
    Valid from
    Valid to
    Number
    SAP_BASIS
    46B
    46D
    473267
    SAP_BASIS
    610
    620
    473185
    Support Packages & Patches
    Support Packages
    Software Component
    Release
    Support Package
    SAP_BASIS
    46B
    SAPKB46B48
    46C
    SAPKB46C39
    46D
    SAPKB46D28
    610
    SAPKB61027
    620
    SAPKB62014
    Regards
    Miguel

  • Name of sap script form

    hi ,
    If I am calling a subroutine from a SAP SCRIPT ....and I want the name of the sap script which is  calling it ... means there is a subroutine which more that one script calls ...if I want to find out which one is calling it how can we find that out.for example like sy-cprog or sy-repid..is there anything????? pls advise

    Hi,
    I hereby attach the source code of a pgm which may be used to do a 'search' operation in source code of the SAP Script.Please note that this is not my pgm, I had downloaded from one of the sites. Unfortunately I neither remember the name of teh site nor the name of the author. However I have been using it without any problems.
    REPORT ZSEARCH_ITEMS_IN_SAPSCRIPT
           NO STANDARD PAGE HEADING LINE-SIZE 208.
    *=======================================================================
    * Omschrijving : Searching different items (e.g. strings, field, text,
    *                program-names etc..) in sapscript forms
    * Auteur       : Angelo Hoppenbrouwer
    * Datum        : 07-11-2001
    *======================================================================*
    TABLES: STXL,
            TLINE.
    DATA BEGIN OF BDCDATA OCCURS 100.
            INCLUDE STRUCTURE BDCDATA.
    DATA END OF BDCDATA.
    DATA BEGIN OF LINES OCCURS 100.
            INCLUDE STRUCTURE TLINE.
    DATA END OF LINES.
    DATA: BEGIN OF STXL_ID,
            TDOBJECT LIKE STXL-TDOBJECT,
            TDNAME   LIKE STXL-TDNAME,
            TDID     LIKE STXL-TDID,
            TDSPRAS  LIKE STXL-TDSPRAS,
          END OF STXL_ID.
    DATA: BEGIN OF KOP,
            TXT(208),
          END OF KOP.
    DATA: I_STXL LIKE STXL OCCURS 10 WITH HEADER LINE,
          I_TAB(40) OCCURS 10 WITH HEADER LINE,
          CLIENT LIKE SY-MANDT,
          H_FIELD(40),
          H_VALUE(40),
          H_LINE LIKE SY-LINNO,
          H_OFFSET TYPE I,
          H_REGEL(70) TYPE C,
          H_TEL TYPE I,
          H_TOT TYPE I,
          H_POS TYPE I,
          H_POS1 TYPE I,
          H_POS2 TYPE I,
          H_LEN TYPE I,
          VORIGE_TDSPRAS_TDNAME(71) TYPE C,
          HUIDIGE_TDSPRAS_TDNAME(71) TYPE C,
          P_NAAM LIKE RSEUX-CP_VALUE,
          H_TXT1(40),
          H_TXT2(40),
          H_WINDOW(132),
          H_STRING(40),
          H_STRING1(40),
          H_STRING2 LIKE H_STRING1,
          H_LINE1 LIKE LINES-TDLINE,
          H_LINE2 LIKE H_LINE1.
    SELECTION-SCREEN BEGIN OF BLOCK ZOEK_ITEM
                           WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: PA_ITEM1 RADIOBUTTON GROUP ITEM DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 4(16) TEXT-011.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: PA_ITEM2 RADIOBUTTON GROUP ITEM.
    SELECTION-SCREEN COMMENT 4(16) TEXT-012.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: PA_ITEM3 RADIOBUTTON GROUP ITEM.
    SELECTION-SCREEN COMMENT 4(16) TEXT-013.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: PA_ITEM4 RADIOBUTTON GROUP ITEM.
    SELECTION-SCREEN COMMENT 4(16) TEXT-014.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: PA_ITEM5 RADIOBUTTON GROUP ITEM.
    SELECTION-SCREEN COMMENT 4(16) TEXT-015.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK ZOEK_ITEM.
    SELECTION-SCREEN BEGIN OF BLOCK ITEM_WAARDE
                           WITH FRAME TITLE TEXT-002.
    PARAMETERS: PA_STR(40) OBLIGATORY,
                PA_MANDT LIKE SY-MANDT DEFAULT SY-MANDT.
    SELECTION-SCREEN END OF BLOCK ITEM_WAARDE.
    SELECTION-SCREEN BEGIN OF BLOCK FORM
                           WITH FRAME TITLE TEXT-003.
    SELECT-OPTIONS: SO_NAME  FOR STXL-TDNAME  NO INTERVALS
                                              DEFAULT 'Z*'
                                              OPTION CP,
                    SO_SPRAS FOR STXL-TDSPRAS NO INTERVALS
                                              DEFAULT 'NL'.
    SELECTION-SCREEN END OF BLOCK FORM.
    START-OF-SELECTION.
      CLIENT = SY-MANDT.
      CLEAR: H_STRING1, H_STRING2.
      IF NOT PA_ITEM1 IS INITIAL.          " Standaardtekst
        CONCATENATE 'include' PA_STR INTO H_STRING1 SEPARATED BY ' '.
        H_TXT1 = 'standard text'.
      ENDIF.
      IF NOT PA_ITEM2 IS INITIAL.          " Tabel (+veld)
        CONCATENATE '&' PA_STR INTO H_STRING1.
        H_TXT1 = 'table (+field)'.
      ENDIF.
      IF NOT PA_ITEM3 IS INITIAL.          " Hulpveld
        CONCATENATE '&' PA_STR '&' INTO H_STRING1.
        H_TXT1 = 'variable'.
      ENDIF.
      IF NOT PA_ITEM4 IS INITIAL.          " Programma
        CONCATENATE 'in program' PA_STR INTO H_STRING1 SEPARATED BY ' '.
        H_TXT1 = 'program'.
      ENDIF.
      IF NOT PA_ITEM5 IS INITIAL.          " String
        H_STRING1 = PA_STR.
        H_TXT1 = 'string'.
      ENDIF.
      CONCATENATE '"' PA_STR '"' INTO H_TXT2.
      FORMAT COLOR COL_HEADING INTENSIFIED ON.
      CONCATENATE 'Use of'
                  H_TXT1
                  H_TXT2
                  'in forms'
                  INTO KOP SEPARATED BY ' '.
      WRITE: / KOP.
      ULINE.
      FORMAT COLOR COL_HEADING INTENSIFIED OFF.
      WRITE: /         'Clt',
              005      'Form',
              036      'Lang',
              041(030) 'Window',
              072(002) 'Fm',
              077(132) 'Row'.
      ULINE.
      FORMAT COLOR COL_NORMAL INTENSIFIED ON.
      STXL_ID-TDOBJECT = 'FORM'.
      STXL_ID-TDID = 'TXT'.
      SELECT * FROM STXL CLIENT SPECIFIED
              WHERE MANDT    = PA_MANDT
                AND RELID    EQ 'TX'
                AND TDOBJECT EQ 'FORM'
                AND TDID     EQ 'TXT'
                AND TDNAME   IN SO_NAME
                AND TDSPRAS  IN SO_SPRAS.
        MOVE-CORRESPONDING STXL TO I_STXL.
        APPEND I_STXL.
      ENDSELECT.
      SORT I_STXL.
      CLEAR HUIDIGE_TDSPRAS_TDNAME.
      CLEAR VORIGE_TDSPRAS_TDNAME.
      LOOP AT I_STXL.
        STXL_ID-TDNAME  = I_STXL-TDNAME.
        STXL_ID-TDSPRAS = I_STXL-TDSPRAS.
        STXL_ID-TDID    = I_STXL-TDID.
        CONCATENATE STXL_ID-TDSPRAS STXL_ID-TDNAME
                    INTO HUIDIGE_TDSPRAS_TDNAME.
        IF HUIDIGE_TDSPRAS_TDNAME <> VORIGE_TDSPRAS_TDNAME.
          CONCATENATE STXL_ID-TDSPRAS STXL_ID-TDNAME
                                      INTO VORIGE_TDSPRAS_TDNAME.
          REFRESH LINES.
          CLEAR H_TEL.
          IMPORT TLINE TO LINES FROM DATABASE STXL(TX)
                                     CLIENT   I_STXL-MANDT
                                     ID       STXL_ID.
          LOOP AT LINES.
            IF LINES-TDFORMAT = '/W'.
              H_WINDOW = LINES-TDLINE.
            ENDIF.
            SEARCH LINES-TDLINE FOR H_STRING1.
            IF SY-SUBRC <> 0 AND H_STRING2 <> SPACE.
              SEARCH LINES-TDLINE FOR H_STRING2.
            ENDIF.
            IF SY-SUBRC EQ 0 AND LINES-TDFORMAT NE '/*'.
              H_POS = SY-FDPOS.
              IF NOT PA_ITEM1 IS INITIAL.
                ADD 8 TO H_POS.
              ENDIF.
              IF NOT PA_ITEM4 IS INITIAL.
                ADD 11 TO H_POS.
              ENDIF.
              H_LEN = STRLEN( PA_STR ).
              H_STRING = LINES-TDLINE+H_POS(H_LEN).
              IF H_TEL EQ 0.
                HIDE I_STXL-MANDT.
                HIDE STXL-TDNAME.
                HIDE I_STXL-TDSPRAS.
                WRITE: /001 I_STXL-MANDT,
                        005 STXL-TDNAME HOTSPOT ON,
                        036 I_STXL-TDSPRAS,
                        041 H_WINDOW(30).
                CLEAR STXL-TDNAME.
              ELSE.
                WRITE: /041 H_WINDOW(30).
              ENDIF.
              WRITE: 072 LINES-TDFORMAT.
              H_POS1 = 77 + H_POS.
              H_POS2 = H_POS + STRLEN( H_STRING ).
              IF H_POS EQ 0.
                CLEAR H_LINE1.
              ELSE.
                H_LINE1 = LINES-TDLINE(H_POS).
              ENDIF.
              H_LINE2 = LINES-TDLINE+H_POS2.
              H_POS2 = H_POS2 + 77.
              WRITE: 077       H_LINE1,
                     AT H_POS1 H_STRING COLOR COL_HEADING,
                     AT H_POS2 H_LINE2.
              H_TEL = H_TEL + 1.
              H_TOT = H_TOT + 1.
            ENDIF.
          ENDLOOP.
          IF NOT H_TEL IS INITIAL.
            ULINE.
          ENDIF.
        ENDIF.
      ENDLOOP.
      FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
      SKIP 1.
      WRITE: / 'Number of hits:', H_TOT.
    AT LINE-SELECTION.
      CHECK STXL-TDNAME <> SPACE.
      GET CURSOR FIELD  H_FIELD
                 VALUE  H_VALUE
                 LINE   H_LINE
                 OFFSET H_OFFSET.
      CHECK H_FIELD = 'STXL-TDNAME'.
      CHECK I_STXL-MANDT = SY-MANDT.
      REFRESH BDCDATA.
      PERFORM BDC_DYNPRO USING 'SAPMSSCF'      '1102'.
      PERFORM BDC_FIELD  USING 'RSSCF-TDFORM'  STXL-TDNAME.
      PERFORM BDC_FIELD  USING 'RSSCF-TDSPRAS' I_STXL-TDSPRAS.
      CALL TRANSACTION 'SE71'  USING BDCDATA.
      CLEAR STXL-TDNAME.
    *&      Form  BDC_DYNPRO
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.                               " BDC_DYNPRO
    *&      Form  BDC_FIELD
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDCDATA.
      BDCDATA-FNAM = FNAM.
      BDCDATA-FVAL = FVAL.
      APPEND BDCDATA.
    ENDFORM.                               " BDC_FIELD
    *Comment Angelo:
    *Selection-texts:
    *PA_ITEM1
    *PA_ITEM2
    *PA_ITEM3
    *PA_ITEM4
    *PA_ITEM5
    *PA_MANDT     Client
    *PA_STR       Search-item
    *SO_NAME      Form
    *SO_SPRAS     Language
    *Text-symbols:
    *001     Selection search-item
    *002     Value
    *003     Selection form(s)
    *011     Standard text
    *012     Table (+ field)
    *013     Variable
    *014     Program
    *015     String
    Once you copy the above mentioned program.Just run this pgm with the parameters:-
    Selection search text: String
    Search text: PERFORM name_of_the_subroutine
    Selection Forms: Z*
    Language: E
    & it will display all the SAP Scripts from where this routine is being called.
    I hope this helps,
    Regards
    Raju Chitale

  • How to use IF Conditon in SAP Scripts?

    Hi Guys,
                   I am having adoubt how to use IF conditon with multiple variables in SAp Scripts
    for ex If a>b and a>c and a>d
             Elseif b>a and b>c and b> d.
             Elseif .....
              endif.
              How to use above example in SAP Scripts.
    thanks,
    Gopi.

    hi Gopi,
    it is almost the same as normal ABAP, you only have to use & before and after the variable and the variable has to be in capitals and you have to make the line as command ( /: before the line )
    IF &A& > &B& AND ...
    text to print
    ELSEIF ...
    text to print
    ENDIF.
    hope this helps
    ec

  • How to suppress the name if it is blank in sap script

    hi
    I have one doubt
    iam print NAME2 in sap script.
    if NAME2 is balnk
    blank line is coming
    but my requiremt is if it is balnk, blank line sould not come
    i tried with NAME2(I) but it is not working
    please give the solutions at the earliest
    very urgent
    thanks
    regards
    venu

    Hi Venu,
    Try with this code.
    <b>&NAME2(F*)</b>
    You can replace leading spaces in a value with a fill character. Use the F option with the character immediately following the F in the specification as the fill character.
    In your case if it is empty then it will comes with *s.
    Check this link for Fill characters
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/8032cc454211d189710000e8322d00/frameset.htm
    Thanks,
    Vinay

  • How can we make language translation in sap script?

    Hi expert,
    Based on language i have to display text in sap script form.
    please i like to know how to maintain language translation in sap script.
    manually i am handling the language text in print program.
    like below.
    if language = 'EN'
       text in english.
    endif.
    if language = 'DE'
      text in German.
    endif.
    good points will be given for proper answer.
    Thanks and regards,
    Pavan.

    Hello there!
    If those texts are static, you can use the following procedure (to translate your text elements):
    Go to SE63, then in the menu follow this path:
    Translation->ABAP Objects->Other Long Texts->FS (forms and styles)->FORM (Forms)
    This will transport you for a screen where you can choose the script (Object -> field Object Name). Press Enter. If says object not found, it's because the source language is wrong (box below named translation -> field source language --- press F4 to change it)
    After this, you'll navigate (after pressing Enter with correct language in source and choosing a correct one in target) to the transaltion screen. You'll have you text elements, original on top, your transalation below.
    If those texts are dynamic, I believe you have to do the way you are doing.
    Hope this helps.

  • SAP Script barcode

    HI  Friends,
    I want to add barcode in SAPScript.I already made one Z barcode in T.code se73.
    I also assign in  se71 barcode in character formats.
    So please check it.and tell me how we can display barcode in sap script.
    Thanks in advance.

    Hi,
    To Create a Bar code prefix:
    1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
    2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
    Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
    The place where you are using the field value use like this
    <C1> &itab-field& </C1>.
    You will get the field value in the form of barcode.
    Which barcode printer are you using ? Can you download this file and see.
    http://www.servopack.de/Files/HB/ZPLcommands.pdf.
    It will give an idea about barcode commands.
    Check this link:
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
    Detailed information about SAP Barcodes
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    Refer to the following link:
    http://help.sap.com/saphelp_nw04/helpdata/en/66/1b45c136639542a83663072a74a21c/content.htm
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    Check this link
    barcode
    smartform Barcode
    Thanks.
    Reward If Helpful.

Maybe you are looking for

  • CUCM 8.6.2 - SURL Buttons Issue related to Extension Mobility

    Hello Guys, we are running a CUCM 8.6.2.22900-2 with the extension mobility service. One the user device profiles we have applied several third application services via SURL buttons.  Actually I though it does not matter, what device type I choose du

  • Export Book as SWF - formatting (single page on screen at start)

    Was this book created in InDesign? http://www.qub.ac.uk/edu/Summer%2010%20Newsletter/ I am currently working on an annual report and when finished want to save it in various formats, one being export to SWF with page turns. I successfully tested this

  • Custom Function in a Sequence Not Working

    Hi All, We have defined a Custom Function and it has got a class (ZCL_IP_DERIVE_XXX_XXXX). Further, in the IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE method of this class, we have defined a logic of appying a new Index (Sales Curve) and the forecast valu

  • Regarding Default Tab under settings

    Hi All, In Sap portal - Km Content - Settings - Properties. under Properties The custom tab is not getting enabled. It is locked. How can i enable it. Right now i cant click it. Can anyone please help me in this issue? Regards, Divya

  • Merging files on a mac

    My video split my recording into two how do I merge these into one video using a Mac computer