Problem in sapscript.

In this a sapscript driving program .this is use for printing data when I click print preview one line have different text .i want to correct that text in script form. But I m not able to identify form name can u tell me how to get form name or how to solve the problem.
REPORT zj_1i57fp MESSAGE-ID 8i.
TABLES: t001w,
        j_1iwrkcus,
        j_1iregset,
        j_1iindcus,
        j_1iexcdtl,
        j_1iexchdr,
        lfa1,
        adrc,
        t001.
Begin 11.05.99
DATA : BEGIN OF listtab OCCURS 30,
         procdoc(1) TYPE c,
         exnum   LIKE j_1iexchdr-exnum,
         exdat   LIKE j_1iexchdr-exdat,
         srgrp   LIKE j_1iexchdr-srgrp,
         preprn  LIKE j_1iexchdr-preprn,
         exbed   LIKE j_1iexchdr-exbed,
         exsed   LIKE j_1iexchdr-exsed,
         exaed   LIKE j_1iexchdr-exaed,
         list_line LIKE sy-linno,
       END OF listtab.
End 11.05.99
DATA : BEGIN OF options.
        INCLUDE STRUCTURE itcpo.
DATA : END OF options.
DATA : BEGIN OF result.
        INCLUDE STRUCTURE itcpp.
DATA : END OF result.
DATA : BEGIN OF thead OCCURS 10.
        INCLUDE STRUCTURE thead.
DATA : END OF thead.
DATA : BEGIN OF tlines OCCURS 10.
        INCLUDE STRUCTURE tline.
DATA : END OF tlines.
DATA : text_id(4) TYPE c.
DATA : doc_num LIKE j_1iexchdr-exnum,  " pai 17/09/98
       m_length TYPE i.                " pai
Begin 11.05.99
DATA : doc_no   LIKE j_1iexchdr-exnum,
       doc_dt   LIKE j_1iexchdr-exdat,
       series   LIKE j_1iexchdr-srgrp,
       preprn   LIKE j_1iexchdr-preprn,
       m_selected,
       m_date(10) TYPE c,
       tabix LIKE sy-tabix.
DATA : it_pcrdtl LIKE TABLE OF zeou_pcrdtl WITH HEADER LINE,
       it_pcrhdr LIKE TABLE OF zeou_pcrhdr WITH HEADER LINE .
DATA : wa_mara TYPE mara,
       wa_t032t TYPE t023t.
DATA : gv_tot_duty TYPE konv-kwert,
       gv_tot_amt TYPE konv-kwert,
       gv_tot_val TYPE konv-kwert.
SELECT-OPTIONS: se_exnum FOR j_1iexchdr-exnum,
                se_exdat FOR j_1iexchdr-exdat.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF BLOCK 4 WITH FRAME TITLE text-005.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN POSITION 01.
PARAMETERS: p_print RADIOBUTTON GROUP grp1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT (15) text-006.
SELECTION-SCREEN POSITION 20.
PARAMETERS: p_reprn RADIOBUTTON GROUP grp1.
SELECTION-SCREEN COMMENT (20) text-007.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK 4.
End 11.05.99
doc_num = doc_no.                      " pai
m_length = STRLEN( doc_num ).
WHILE m_length < 10.
  CONCATENATE '0' doc_num INTO doc_num.
  m_length = m_length + 1.
ENDWHILE.
doc_no = doc_num.                      " pai
Begin 11.05.99
TOP-OF-PAGE.
  WRITE :/3 text-001,
            text-002,
            text-003,
            text-004.
START-OF-SELECTION.
  IF p_print = 'X'.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE listtab FROM j_1iexchdr
         WHERE trntyp = '57FC' AND status = 'P' AND
               exnum IN se_exnum AND exdat IN se_exdat AND preprn = ''.
  ELSEIF p_reprn = 'X'.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE listtab FROM j_1iexchdr
         WHERE trntyp = '57FC' AND status = 'P' AND
               exnum IN se_exnum AND exdat IN se_exdat.
  ENDIF.
  IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH
       'No data available or Document already printed'.
  ENDIF.
END-OF-SELECTION.
  SET PF-STATUS '100'.
  SORT listtab BY exnum exdat.
  LOOP AT listtab.
    WRITE :/ listtab-procdoc AS CHECKBOX.
    WRITE :  listtab-exnum UNDER text-001,
             listtab-exdat UNDER text-002.
    WRITE AT 30 listtab-srgrp.
    WRITE AT 45 listtab-preprn.
    listtab-list_line = sy-linno.
    MODIFY listtab.
  ENDLOOP.
AT USER-COMMAND.
  CASE sy-ucomm.
    WHEN 'EPRN'.
      DO.
        tabix = sy-index.
        READ LINE sy-index FIELD VALUE listtab-procdoc.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        IF listtab-procdoc = 'X'.
          READ TABLE listtab WITH KEY list_line = tabix.
          doc_no = listtab-exnum.
          doc_dt = listtab-exdat.
          series = listtab-srgrp.
          m_selected = 'y'.
          EXIT.
        ENDIF.
      ENDDO.
  ENDCASE.
Call fn. module to capture pre-printed excise no.
  IF m_selected = 'y'.
    CALL FUNCTION 'J_1I_ACCEPT_VALUE'
      EXPORTING
        i_preprn = preprn
      IMPORTING
        o_preprn = preprn.
  ELSE.
    MESSAGE e000(8i) WITH 'Select a Document'.
  ENDIF.
Check whether entered pre-printed excise no. already exists
  SELECT SINGLE * FROM j_1iexchdr WHERE preprn = preprn AND
                                        status <> 'D' AND
                                  NOT (  exnum   = doc_no
                                  AND    exdat   = doc_dt
                                  AND    srgrp   = series ).
  IF sy-subrc = 0.
    SET CURSOR FIELD 'PREPRN'.
    MESSAGE e000(8i) WITH 'Pre-printed excise no.' preprn 'already used'.
  ENDIF.
End 11.05.99
  SELECT SINGLE * FROM j_1iexchdr
  WHERE   exnum   = doc_no
  AND     exdat   = doc_dt
  AND     srgrp   = series.
IF SY-SUBRC <> 0.
   MESSAGE E000(8I) WITH 'Invalid Challan number entered'.
                                                            "10.05.99
ELSEIF J_1IEXCHDR-PREPRN <> PREPRN AND J_1IEXCHDR-PREPRN <> ''.
   MESSAGE E000(8I) WITH
   '57F4' DOC_NO 'already printed with pre-printed excise no.'
    J_1IEXCHDR-PREPRN.
ENDIF.
IF J_1IEXCHDR-STATUS NE 'P'.
   MESSAGE E000(8I) WITH 'Challan status is not posted..cannot print'.
ENDIF.
Begin 10.05.99
j_1iexchdr-exbed = j_1iexchdr-exbed + j_1iexchdr-exsed +
                   j_1iexchdr-exaed.
Begin 10.05.99
Print totals of BED, SED, AED
  j_1iexchdr-exbed = listtab-exbed + listtab-exsed + listtab-exaed.
  listtab-procdoc = ''.
  listtab-preprn = preprn.
  MODIFY LINE listtab-list_line FIELD VALUE listtab-procdoc
              listtab-preprn LINE FORMAT COLOR 6 INPUT OFF.
End 10.05.99
Printing options
  options-tdcopies   = 1 .
  options-tdnewid   = 'X' .
  options-tddataset  = 'LIST1' .
  options-tddelete   = 'X' .
  options-tdprogram  = sy-repid.
  options-tdpreview  = 'X' .
  PERFORM open_form.
  PERFORM get_header_data.
  PERFORM write_form USING 'TITLE' 'DOC_TITLE_T' 'SET'.
  PERFORM write_form USING 'INFO' 'HEADER_DATA' 'SET'.
Print Line items
  PERFORM write_form USING 'MAIN' 'DASH_LINE'   'SET'.
  PERFORM write_form USING 'MAIN' 'ITEM_HEADER' 'SET'.
  PERFORM write_form USING 'MAIN' 'DASH_LINE'   'SET'.
****Start of Changes***********************************
  DATA: gs_mseg TYPE mseg.
  CLEAR: gs_mseg.
  SELECT * FROM zeou_pcrdtl INTO TABLE it_pcrdtl
  WHERE exnum =  doc_no " j_1iexcdtl-exnum
  AND   exdat = doc_dt. "  j_1iexcdtl-exdat.
****End of Changes*************************************
  SELECT * FROM j_1iexcdtl WHERE exnum = doc_no AND
                                 exdat = doc_dt.
   SELECT SINGLE * FROM zeou_pcidtl INTO it_pcidtl
   WHERE ebeln =  j_1iexcdtl-rdoc1
   AND matnr = j_1iexcdtl-matnr.
****Start of Changes***********************************
   SELECT SINGLE * FROM zeou_pcrdtl INTO it_pcrdtl
   WHERE exnum =  j_1iexcdtl-exnum
   AND exdat = j_1iexcdtl-exdat.
    SELECT SINGLE * FROM mseg
                    INTO gs_mseg
                    WHERE mblnr = j_1iexcdtl-rdoc2
                    AND   mjahr = j_1iexcdtl-ryear2
                    AND   parent_id = j_1iexcdtl-ritem2.
    CLEAR it_pcrdtl.
    READ TABLE it_pcrdtl WITH KEY mblnr = gs_mseg-mblnr
                                  mjahr = gs_mseg-mjahr
                                  zeile = gs_mseg-zeile.
****End of Changes*************************************
    SELECT SINGLE * FROM mara INTO wa_mara
    WHERE matnr = j_1iexcdtl-matnr.
    SELECT SINGLE * FROM t023t INTO wa_t032t
    WHERE matkl = wa_mara-matkl
    AND spras = 'EN'.
    PERFORM write_form USING 'MAIN' 'ITEM_VALUES' 'SET'.
    gv_tot_duty = gv_tot_duty + it_pcrdtl-boedr.
    gv_tot_val =  gv_tot_val + it_pcrdtl-pcram.
    gv_tot_amt =  gv_tot_amt + j_1iexcdtl-exbas.
  ENDSELECT.
  PERFORM write_form USING 'MAIN' 'DASH_LINE' 'SET'.
  PERFORM write_form USING 'MAIN' 'TOTAL' 'SET'.
  SELECT SINGLE * FROM zeou_pcrhdr INTO it_pcrhdr
   WHERE pcrnr =  it_pcrdtl-pcrnr
   AND pcrdt = it_pcrdtl-pcrdt.
  PERFORM write_form USING 'MAIN' 'JOB_WORKER_ADDRESS' 'SET'.
  PERFORM write_form USING 'HEADER' ' ' ' '.
  text_id = 'PROC'.
*concatenate j_1iexchdr-rdoc j_1iexchdr-ryear into thead-tdname.
  thead-tdname = '57FC'.
  PERFORM read_text.
  LOOP AT tlines.
    IF tlines-tdline NE space.
      j_1iregset-j_1irgdesc = tlines-tdline.
    ENDIF.
  ENDLOOP.
  PERFORM write_form USING 'FOOTER' ' ' 'SET'.
  PERFORM endform.
Update table with entered preprn excise no.                "10.05.99
  UPDATE j_1iexchdr SET preprn = preprn
                    WHERE   exnum   = doc_no
                    AND     exdat   = doc_dt
                    AND     srgrp   = series.
*&      Form  OPEN_FORM
      text                                                           *
-->  p1        text
<--  p2        text
FORM open_form.
  CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      application = ''
      device      = 'PRINTER'
      dialog      = 'X'
      form        = 'ZJ_1I_57F4'
    IMPORTING
      RESULT      = RESULT
    exceptions
      canceled    = 1
      device      = 2
      form        = 3
      OPTIONS     = 4
      unclosed    = 5
      OTHERS      = 6.
  IF sy-subrc NE 0.
    MESSAGE e888.
  ENDIF.
ENDFORM.                               " OPEN_FORM
*&      Form  WRITE_FORM
      text                                                           *
-->  p1        text
<--  p2        text
FORM write_form USING  window element fnction.
  CALL FUNCTION 'WRITE_FORM'
       EXPORTING
           element       = element
           function      = fnction
           window        = window
   IMPORTING
        PENDING_LINES =
       EXCEPTIONS
            element       = 1
            function      = 2
            type          = 3
            unopened      = 4
            unstarted     = 5
            window        = 6
            OTHERS        = 7.
ENDFORM.                               " WRITE_FORM
*&      Form  ENDFORM
      text                                                           *
-->  p1        text
<--  p2        text
FORM endform.
  CALL FUNCTION 'CLOSE_FORM'
       IMPORTING
            RESULT   = RESULT
    TABLES
        OTFDATA  =
       exceptions
            unopened = 1
            OTHERS   = 2.
ENDFORM.                               " ENDFORM
*&      Form  GET_HEADER_DATA
      text                                                           *
-->  p1        text
<--  p2        text
FORM get_header_data.
  CLEAR: t001w,j_1iwrkcus,j_1iregset,j_1iindcus.
  SELECT SINGLE * FROM  t001w
        WHERE  werks       = j_1iexchdr-werks.
  SELECT SINGLE * FROM j_1iwrkcus
        WHERE  j_1iwerks   = j_1iexchdr-werks.
  IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'plant customisation not found'.
  ENDIF.
  SELECT SINGLE * FROM j_1iregset
        WHERE  j_1iregid   = j_1iwrkcus-j_1iregid.
  IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'register id customisation not found'.
  ENDIF.
  SELECT SINGLE * FROM j_1iindcus WHERE
         j_1ibukrs = j_1iexchdr-bukrs.
  IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'Customisation missing .. indcus'.
  ENDIF.
  SELECT SINGLE * FROM lfa1 WHERE
  lifnr = j_1iexchdr-lifnr.
  IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'Vendor record missing ....'.
**Vendor full address
  ELSE.
    SELECT SINGLE * FROM t001
                    WHERE bukrs EQ j_1iexchdr-bukrs.
    SELECT SINGLE * FROM   adrc
                    WHERE  addrnumber EQ lfa1-adrnr.
  ENDIF.
ENDFORM.                               " GET_HEADER_DATA
*&      Form  READ_TEXT
      text                                                           *
-->  p1        text
<--  p2        text
FORM read_text.
  CALL FUNCTION 'READ_TEXT'
    EXPORTING
      client                  = sy-mandt
      id                      = text_id
      language                = sy-langu
      name                    = thead-tdname
      object                  = 'J1IF'
      archive_handle          = 0
    IMPORTING
      header                  = thead
    TABLES
      lines                   = tlines
    EXCEPTIONS
      id                      = 1
      language                = 2
      name                    = 3
      not_found               = 4
      object                  = 5
      reference_check         = 6
      wrong_access_to_archive = 7
      OTHERS                  = 8.
ENDFORM.                               " READ_TEXT

Hi ,
  The form name is passed as a parameter to the FM OPEN_FORM , in your case look at the code
CALL FUNCTION 'OPEN_FORM'
EXPORTING
application = ''
device = 'PRINTER'
dialog = 'X'
form = 'ZJ_1I_57F4'  " Form Name
IMPORTING
RESULT = RESULT
exceptions
canceled = 1
device = 2
form = 3
OPTIONS = 4
unclosed = 5
OTHERS = 6.
, Now use se71 to see the from and check the text .
Please do revert back in case you want more information.
Regards
Arun

Similar Messages

  • Printing Problem in SAPscript

    Hi friends, I have one problem with sapscript printing. When i am seeing the print preview of a form i dont have any problems with words overlapping. But When i prnt on local printer I am seeing words overlapping. Is there anything worng in my form or anything to be configured with printer ? please help me

    Seems like your Printer Driver and SAP logical printer doesn't match each other. Take a help from your Basis guys.
    Regards,
    Naimesh Patel

  • Printing problem with sapscripts

    Hi everybody, I have a problem with a sapscript. This is called from a user exit, and take one value to print . I have that value in the sapscript with the same value between &&, but it doesn't print anything, only print the text I have there. Does anybody know which could be the problem??
    Thanks in advance

    Hi....
    it will display correctly...
    just check it once.
    if u have a variable called <b>'name'</b> in the print program then use <b>&name&</b> in the script. it will work fine.
    Just check it once.
    Reward points if useful......
    Suresh......

  • Problem in sapscript Main Window Box command - Urgent

    Dear friends,
    Problem while showing boxes in multiple pages in sapscript. Box command is defined begining of the main window. But while printing showing in first page only not in other pages.
    Regards,
    Praveen Lobo

    This could be your problem why box command is not getting displayed in all pages, you might be using the box command in the element that is only called once and that to in the first page... so try to check your form and place you box command under element that is getting called in each and every page, it will solve your poblem.
    Note: for testing you can place your box command under element "/E" where you are displaying your line items... even though it is called multiple number of times it gets overlapped.
    close the thread once your question is answered.
    Regards,
    SaiRam

  • Text problem in SAPScript

    Hello,
    i have a problem i need to print one recepit with sapscript.
    I have to made a changes in displaying the text in o/p but it is in different language i.e PT
    text to display is
    IVA NÃO REGULARIZADO – ARTº 71 CIVA
    Now if you see above in sentence we have some special characters which are not present in keyboard itself.
    Origanal language of form is DE
    Can anyone help me out in this.
    Regards,
    Vikrant

    Hi,
    Goto SE63 and translate the TEXT from one language to other.
    regards,
    Shiva

  • Address problem in sapscript

    Hi,
    I'm creating a sapscript for Sales order, my problem is this:
    when the order is sent to foreing country I would to print the country name, else the country name hasn't is displayed.
    Thank you.

    Hi Ierardi Leo,
    To control the country name displayed in the address, please use the parameter "Sending Country".
    Set the parameter "Sending Country" as the country of your Sales Org(VKORG)/Company code(BUKRS)/Shipped from(VSTEL).
    The logic based on Sending Country followed by SAP is as follows,
    1. If Sending country is same as destination country then, Country name is not displayed
    2. If Sending country is not same as destination country then, Country name is displayed
    I hope this solves your problem.
    Regards,
    Amit

  • Problem in sapscript form from dev to quality server - 333 to 555

    Moved to correct forum
    Hi,
    I am working on a script form in which i am performing the modifciations in the form but the problem is when i try to check it ,it says the form does not exist.
    Actually the (dev) 333 server contains no dat as it is simply for the new report code where as 555(Quallity) Server is the replica of the Prd server and the valid data is present in it.
    I had try to perform the cpoy form client ,but it is allowing me to it in the quality as the error msg comes:-
    Changes to Repository or cross-client Customizing are not permitted
    Choose 'Display object' or 'Cancel'.
    Plzz provide me guidelines how to solve this problem.
    Edited by: Matt on Mar 13, 2009 8:28 AM - fixed subject formatting, moved to correct forum

    From what I understand from your first post, I think 333 and 555 are two different systems like dev and quality and in this case you will not able to get the sapscript in 555 by doing SCC1.
    You will have to attach the script into a transport request (when you change and try to save it will ask for a TR , click create new and save it - you will have to assign a package which you can check in the attributes of the script and use the same ) , activate the script.
    Now go to SE09 , for your user name , display request and you will find the Transport request and task under it.If you feel the changes you made are complete, then release the Task and then release the TR.
    Now you need to request the basis team (or who ever is authorized ) to import this to the 555.
    Hope this helps.
    Mathews

  • Turkish character problem in SAPScript

    Hi ,
    I have created a SAPScript form (Purchasing - RFQ) original language is TR, and created a copy of this in language EN.
    I have problem with Turkish characters when printing an RFQ in English.
    Any comments ?
    Thanks.
    Utku

    hii
    The logic to build SAP Script and Smart form of all languages will be same. But while working on Asian language please take care of the following points.
    1 Make sure you logon to SAP in turkish language only.
    2 At the Operating system level install the turkish language.[Control panel - >Regional and language Option - >language Tab - > Click on Install Files for East Asian languages] If these language already installed then click on Detail and add the turkish languages .
    3 At SAP level click on Customizing of Local layout[Alt+F12] and click on options.Go to tab I18N and click on Activate the multi-byte functionalities to support check box.
    4.Take care of the Font while assigning to Character formar or paragraph format. Dont use normal font name.
    USE turkish FONT
    Revert back for more help
    Regards
    Naresh

  • Problem with SAPScript BOTTOM Command

    I have a SAPScript form with multiple paragraphs. In the original version I put a footnote at the bottom of a page by doing something like:
    >/E FOOT_NOTE                                                            
    >/: BOTTOM                                                               
    >B1 <NR><I0><HL><IT> Some fixed text.</>                                                 
    >/: ENDBOTTOM                                                            
    That worked correctly. Now I am changing the form so that a number of paragraphs may or may not appear at the bottom of the page. Since I donu2019t know which paragraph may be first, I tried creating two new paragraphs:
    >/E           START_BOTTOM
    >/:           BOTTOM
    >/*                                                                                  
    >/E           END_BOTTOM
    >/:           ENDBOTTOM
    I call START_BOTTOM, then conditionally call whatever paragraphs are needed and finally call END_BOTTOM.
    The problem is that the paragraphs simply continue on from the last line that was printed, not at the end of the page.
    (I had also tried putting:
    >/E           START_BOTTOM
    At the beginning of each paragraph that could appear at the end, and it worked to a point u2013 each paragraph appeared at the end, but overwrote whatever previous paragraphs were there.)
    Can anyone help me with controlling my BOTTOM?
    Thanks
    Rob

    Yes that's true, that Split in BOTTOM command doesn't work same as it works with the PROTECT.. ENDPROTECT.
    But, after some research I got success.
    Don't create any element in your MAIN window for BOTTOM / ENDBOTTOM. Use the FM WRITE_FORM_LINES to append entire BOTTOM .. ENDBOTTOM lines. Like:
    data: la_head like THEAD,
          lt_lines type standard table of TLINE,
          la_lines like line of lt_lines.
    select single * from stxh into la_head
      where TDOBJECT = 'FORM'
        and TDNAME   = 'ZTEST_WATERMARK'
        and TDID     = 'DEF'
        and TDSPRAS  = sy-langu.
    * Bottom Start
    la_lines-tdformat = '/:'.
    la_lines-TDLINE  = 'BOTTOM'.
    append la_lines to lt_lines.
    * Generic Text
    la_lines-tdformat = '*'.
    la_lines-TDLINE  = 'This is BOTTOM'.
    append la_lines to lt_lines.
    * Include Text1
    la_lines-tdformat = '/:'.
    concatenate '''' 'A1' '''' into la_lines-TDLINE.
    concatenate 'INCLUDE ZTEST_NP OBJECT TEXT ID ST PARAGRAPH '
      la_lines-TDLINE into la_lines-TDLINE separated by ' '.
    append la_lines to lt_lines.
    * Include Text1
    la_lines-tdformat = '/:'.
    concatenate '''' 'A1' '''' into la_lines-TDLINE.
    concatenate 'INCLUDE ZTEST_NP1 OBJECT TEXT ID ST PARAGRAPH '
      la_lines-TDLINE into la_lines-TDLINE separated by ' '.
    append la_lines to lt_lines.
    * Bottom End
    la_lines-tdformat = '/:'.
    la_lines-TDLINE  = 'ENDBOTTOM'.
    append la_lines to lt_lines.
    * Append lines to MAIN
    CALL FUNCTION 'WRITE_FORM_LINES'
      EXPORTING
        FUNCTION                       = 'APPEND'
        header                         = la_head
    *   TYPE                           = 'BODY'
        WINDOW                         = 'MAIN'
      tables
        lines                          = lt_lines
    EXCEPTIONS
       FUNCTION                       = 1
       TYPE                           = 2
       UNOPENED                       = 3
       UNSTARTED                      = 4
       WINDOW                         = 5
       BAD_PAGEFORMAT_FOR_PRINT       = 6
       SPOOL_ERROR                    = 7
       CODEPAGE                       = 8
       OTHERS                         = 9
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Naimesh Patel

  • Problem in Sapscript , After creating a copy of Standard Script

    Hello friends,
                       I have copied a standard script WASCHEIN into ZWASCHEIN, now all the data is coming from driver program SAPM07DR. Now there is one field which is not coming from the standard program,
                      Is there any way i can capture the field in my script without making changes in the standard driver program like a select statement in the script.
    Thanks.
    Edited by: Vijay Babu Dudla on Dec 16, 2008 3:24 AM

    Hello Poonam,
    Sorry i think you are not aware of using PERFORM stmts in SAPScripts !!!
    @ Amit you can try this bit of coding:
    /:           PERFORM F_GET_KTEXT IN PROGRAM ZPROGRAM
    /:           USING &MSEG-NPLNR&
    /:           CHANGING &V_KTEXT&
    /:           ENDPERFORM
    Create a Subroutine-Pool Program: ZPROGRAM where you write the FORM for the above PERFORM.
    FORM f_get_cust_details
    TABLES fp_it_input  STRUCTURE itcsy
                  fp_it_output STRUCTURE itcsy.
    DATA:
      l_v_nplnr TYPE nplnr,
      l_v_ktext TYPE auftext. 
      READ TABLE fp_it_input WITH KEY name = 'MSEG-NPLNR'.
      IF sy-subrc = 0.
        l_v_nplnr = fp_it_input-value.
      ENDIF.
      SELECT SINGLE KTEXT
      INTO l_v_ktext
      FROM aufk
      WHERE aufnr = l_v_nplnr.
      LOOP AT fp_it_output.                                     "#EC *
        IF fp_it_output-name EQ 'V_KTEXT'.
    *     Modifying the output table with the customer number
          fp_it_output-value = l_v_nplnr.
          MODIFY fp_it_output.
      ENDLOOP.
    ENDFORM.
    Please note that passing the USING / CHANGING parameters through tables of ITCSY structures is a standard way of doing this & you cannot change this )
    Hope this helps.
    BR,
    Suhas
    Edited by: Suhas Saha on Dec 16, 2008 9:39 AM

  • Tab problem in sapscript

    Hi all,
    My requirement is I need to print a form in this format in sapscript: -
    All these are in the same text element.
    What happen now is the Text Id cannot display in the correct tab when there is more than one line.
    Not correct (now)
    Type:        TEST FS SPARE
    Text Id :   
    1234,12345,123456,1234567,12345678,123456789,1234567890,123456,1234567,123456,1234567,12345678,1234567,12345678
    Description: Spare Part
    Expected result
    Type:        TEST FS SPARE
    Text Id :    1234,12345,123456,1234567,12345678,123456789,1234567890,
              123456,1234567,123456,1234567,12345678,1234567,12345678
    Description: Spare Part
    Here is my code
    /E      DETAILS
    HA     Type: ,,,,,,,,&RIWO1-MATKTX(C)&
    HA     Text Id.: ,,,,,,,,&GV_FETXT&
    HA     Description.: ,,,,,,,,&GV_DESCP&
      DATA: lv_count TYPE i.
      loop at iviqmfe where fenum > 0 and kzloesch eq space.
        lv_count = lv_count + 1.
        if lv_count EQ 1.
          MOVE iviqmfe-fetxt to gv_fetxt.
        else.
          concatenate gv_fetxt iviqmfe-fetxt into gv_fetxt SEPARATED BY ','.
        endif.
      endloop.
      loop at iviqmfe where fenum > 0 and kzloesch eq space.
        perform print_element using 'DETAILS' 'MAIN'.
      endloop.
    Thanks in advance.

    Hi,
    Instead of using ' ,,,,,, ' again and again,  try giving some value in Tabs in Paragraph formats.. with certain length..
    Hope this helps..

  • Intensity problem in sapscripts

    hai guys,
    the code i have is as follows--
    /:POSITION WINDOW
    /:POSITION XORIGIN '1.0' CH YORIGIN '0.5' LN
    /:BOX FRAME 50TW
    /:BOX HEIGHT '2.5' LN INTENSITY 15
    but the box which i get doesn't have shading.wats the problem with intensity?.plz help me.

    Keep on changing intensity and test it .
    BOX HEIGHT '2.5' LN INTENSITY 15 -> this one increase or decreas like 20 or 30
    Thanks
    Seshu

  • Problem in Sapscripts

    Hi Friends,
    I have modified a sapscripts in Dev server...
    Its ok there.
    But in testing server its is not get excuted ..
    I checked it its showing a message ..
    Charater string  D 1 ; Courier font  090 is not sap font...
    Though i have maintain it as D1 as
    courier font  ..& size 9 point...
    Can any one....

    Hi,
    SAPScripts are Client Dependent, need to transport to Target system/Test Server for every change in Source System. if u r not, plz transport & check...
    Rgds,
    Pavan

  • Amount in words display Problem in sapscript

    Hi All,
    I am worked on cheque print out. I have an amount in words u2018nine crore seventy two lakh thirty three thousand nine hundred ninety nine rupees fifty eight paise onlyu2019 based on the amount value, I have a number of character 105. How will u split the character 50 and 55 character?

    Hi,
    Try this code
    First 50 characters will be in first line of OUT_LINES. Remaining you can concatenate from line 2 and 3
    DATA : OUT_LINES TYPE TABLE OF STRING.
    CALL FUNCTION 'RKD_WORD_WRAP'
      EXPORTING
        TEXTLINE                  = 'nine crore seventy two lakh thirty three thousand nine hundred ninety nine rupees fifty eight paise only'
    *   DELIMITER                 = ' '
        OUTPUTLEN                 = 50
    * IMPORTING
    *   OUT_LINE1                 =
    *   OUT_LINE2                 =
    *   OUT_LINE3                 =
    TABLES
       OUT_LINES                 = OUT_LINES
    * EXCEPTIONS
    *   OUTPUTLEN_TOO_LARGE       = 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.

  • SAPscript Output Problem - Very Urgent - Please help

    Hi,
    I am having the following problem with SAPscript.
    In the Main Window, I have instructions to the printer in the ZPL2 language (For Zebra Printer).
    There are also several variables, which are highlighted in Gray and enclosed in the’&’.
    There are also several elements – all of them empty except for the one where this code is.
    Now, I received this program to modify in terms of code and the output.
    IF you have never done any work with Zebra Printing, the way it is done is that you create a label using the Zebra BarOne or Zebra Designer program, then output it to an ‘itf’ file, upload it into a standard text as .itf and copy the uploaded contents to the main window. When printing to a Zebra printer, the Zebra printer will read the instructions and will print the output.
    Here is the problem: The config for the output type is correct.
    When doing a printing test from SAPscript, I get the right output and the Zebra printer is able to print it.
    However, the real process for this task will go through MB02. There, if I create a spool request using the proper method (select output type and etc.), it will go the spool. However, if I print preview or output (doesn’t work with the Zebra printer, so I have to output to the Laser printer), it will output the following (none of the following includes any of the ZPL2 code/instructions. Instead, it seams to print the variables contents with the field name next to it – This isn’t whats it’s the Main window!!!)
    http://img244.imageshack.us/img244/6915/66052475zk2.jpg
    Please help. I have debugged but don’t know what to do and can’t find anything wrong.
    This is very urgent. Any help will be useful.
    Thanks,
    John

    Ok, maybe I have confused others in regards to the issue as well.
    We expect this label to be output from a Zebra Printer.
    When output through Sapscripts printing test, the preview from the spool shows the ZPL2 code in small font (non readible if a created a screenshot) and if sent to the Zebra Printer, it prints the label correctly.
    When output through MB02, the preview from the spool shows the code that I have attached to the 1st post in this thread. If I try to output to the Zebra Printer, nothing happens because the ZPL2 instructions are not even in the preview and therefore, the Zebra printer recieves no instructions. I should not have mentioned the laser printer, because it has nothing to do with this issue.
    I hope that this makes the issue a little more clear and understandable. Please help.
    Here is the ZPL2 coding before uploading to standard text (only difference is that once uploaded,  the '/' characters are removed.) However, I believe that the problem may lie in the print program and how it compiles but I debugged and haven't really seen where it comes from:
    /:NEW-PAGE
    / ^XA
    / DFNEW-RE-1FS
    / ^PRC
    / LH0,0FS
    / ^LL1830
    / ^MD0
    / ^MNY
    / LH0,0FS
    / FO244,854A0N,55,46CI13FRFB154,1,0,LFN999^FS
    / FO819,698A0N,55,46CI13FRFN998FS
    / FO245,477A0N,55,46CI13FRFB755,1,0,RFN997^FS
    / FO389,926A0N,55,46CI13FRFB654,1,0,RFN996^FS
    / BY3,3.0FO42,1072B3N,N,152,N,YFRFN995FS
    / FO276,1258A0N,55,46CI13FRFN995FS
    / FO484,774A0N,55,46CI13FRFN994FS
    / FO817,774A0N,55,46CI13FRFN993FS
    / FO611,556A0N,55,46CI13FRFN992FS
    / FO245,556A0N,55,46CI13FRFN991FS
    / FO397,117A0N,55,46CI13FRFN990FS
    / FO245,405A0N,55,46CI13FRFB880,1,0,RFN989^FS
    / FO244,698A0N,55,46CI13FRFN988FS
    / FO629,998A0N,55,46CI13FRFN987FS
    / FO244,623A0N,52,42CI13FRFN986FS
    / FO397,261A0N,55,46CI13FRFB404,1,0,RFN985^FS
    / FO819,854A0N,55,46CI13FRFN984FS
    / FO725,554A0N,55,46CI13FRFN983FS
    / FO397,189A0N,55,42CI13FRFB695,1,0,RFN982^FS
    / FO397,333A0N,55,42CI13FRFN981FS
    / FO638,333A0N,55,42CI13FRFN980FS
    / FO391,21A0N,63,63CI13FRFB433,1,0,CFN979^FS
    / FO36,698A0N,55,46CI13FR
    / FDWBS:FS
    / FO37,405A0N,55,46CI13FR
    / FDMATL:FS
    / FO37,478A0N,62,44CI13FR
    / FDDESC:FS
    / FO554,698A0N,55,46CI13FR
    / FDSUPPLIER:FS
    / FO32,625A0N,55,46CI13FR
    / FDTEXT:FS
    / FO35,1258A0N,55,46CI13FR
    / FDBATCH NO:FS
    / FO770,775A0N,63,51CI13FR
    / FD/FS
    / FO32,854A0N,55,46CI13FR
    / FDESHM:FS
    / FO37,556A0N,55,46CI13FR
    / FDQTY:FS
    / FO32,998A0N,55,46CI13FR
    / FDSAP MATERIAL DOC NO:FS
    / FO525,333A0N,55,46CI13FR
    / FDofFS
    / FO556,854A0N,55,46CI13FR
    / FDINSPECT:FS
    / FO32,926A0N,55,46CI13FR
    / FDUNLOADING:FS
    / FO37,117A0N,55,46CI13FR
    / FDSTOCK TYPE:FS
    / FO32,774A0N,55,46CI13FR
    / FDPURCHASE ORDER:FS
    / FO37,188A0N,55,46CI13FR
    / FDDELIVER TO:FS
    / FO37,260A0N,55,46CI13FR
    / FDSTORAGE LOC:FS
    / FO37,332A0N,55,46CI13FR
    / FDCONTAINERS:FS
    / FO1,1359GB1217,0,6^FS
    / FO594,1359GB0,474,6^FS
    / ^XZ
    /:NEW-PAGE
    / ^XA
    / ^XFNEW-RE-1.ZPL
    / FN999FD&ATWRT_HAZAMAT(6)&^FS
    / FN998FD&EKKO-LIFNR&^FS
    / FN997FD&MABDR-MAKTX&^FS
    / FN996FD&MSEG-ABLAD&^FS
    / FN995FD&MSEG-CHARG&^FS
    / FN994FD&MSEG-EBELN&^FS
    / FN993FD&MSEG-EBELP&^FS
    / FN992FD&MSEG-ERFME&^FS
    / FN991FD&MSEG-ERFMG&^FS
    / FN990FD&MSEG-INSMK(1)&^FS
    / FN989FD&MSEG-MATNR&^FS
    / FN988FD&MSEG-MAT_PSPNR&^FS
    / FN987FD&MSEG-MBLNR&^FS
    / FN986FD&MSEG-SGTXT(40)&^FS
    / FN985FD&MSEG-UMLGO&^FS
    / FN984FD&QALS-PRUEFLOS&^FS
    / FN983FD&V_BACKORDER&^FS
    / FN982FD&V_NAME3&^FS
    / FN981FD&WS_CNTR&^FS
    / FN980FD&WS_CON&^FS
    / FN979FD&WS_HEADER& &^FS
    / ^PQ1,0,1,N
    / ^XZ
    / ^FX End of job

Maybe you are looking for

  • How to print from safari on the ipad2?

    I setup my printer on my wireless network and i was able to print a document using "pages".My dad was trying to print an attachment from his email in safari and after the print job was sent, the printer did nothing.I cant seem to print from safari. T

  • Asant problem with some tutorials

    Hey! I have a problem with asant build in the 1.4 tutorial and the chapter with SAAJ and MyUddiPing.java. I have done the changes in BUILD.PROPERTIES (j2ee.home=c:\\sun\\appserver). I can use asant on the Hello1 example but it doesn�t work with this

  • Excess open files in pages

    i was trying to access some info on 70 or so microsoft word files and opened them in pages. realizing i should of just used spotlight ( which i have done to get what i needed) ... my problem is now i can't use pages as it has locked up.  i can't clos

  • Decision making in guided procedures

    Hi Is it possible to call callablle object in EP using some decision? My scenario is like this--- I've three Callable objects. Based on the variable value from first CO, I've to decide whether to call second CO or Third CO. Please suggest me how to p

  • Address Book 3.1.2 excruciatingly slow

    Hello, I recently imported about 150 vcards into AB 3.1.2. Address book has always been slow but now it is extremely slow and I get the spinning rainbow wheel of horror. When I edit records and tab from one field to the next, it takes 10-15 seconds t