Purchase Order SAPscript - Looping problem.

Dear Friends,
I am using a PO Z-form which is a copy of MEDRUCK and print program is Standard SAPLMEDRUCK Program.
I have got a Scenario something like this.
I have to display some classification details of material ( from material master ) in PO.
A material will have 2 or 3 Classes, Each class has got some details.
I have to loop for each class and display the details.
Since I am using Standard Print Program, I Can't Change that.
Is there any workaround method for the above requirement.
Regards,
Hari.

Hi Hari,
             There is not need to use that WRITE_FORM FM,
Instead write the PERFORM statement in the window where you need to display the classification values and after immediately give the variables which holds the classification values.
Example
/:PERFORM GET_COMCODE IN PROGRAM ZM_RFQ_REJECTION
/:USING &EKKO-BUKRS&
/:USING &EKKO-SPRAS&
/:CHANGING &SADR-NAME1&
/:CHANGING &SADR-NAME2&
/:CHANGING &SADR-NAME3&
/:CHANGING &SADR-PSTLZ&
/:CHANGING &SADR-NAME4&
/:ENDPERFORM
B &SADR-NAME1&,, &SADR-NAME2&,,&SADR-NAME3&,, &SADR-PSTLZ&,, &SADR-NAME4&
as in above example you pass the Material no in USING field and in CHANGING fields DEFINE variables for classification and pass
Regards
Bala Krishna

Similar Messages

  • Purchase order and agreement problem

    Hi gurus,
    I have a problem that i've come up with going though event trace on my DEV test system.
    Although, simulation of WF's are fine and all bindings and syntax checks are without error or warnings,
    trace is the only place i've found that something was wrong, appart from that my WF 'WS90200003'
    stopped functioning because of automatic linkage deactivation.
    I had to manually disable automatic linkage deactivation upon error in SWETYPL to keep the WF alive.
    When i did this, all was fine, queing of events started.
    Upon creating purchase order i got following trace:
    BUS2012     RELEASESTEPCREATED     12.05.2008     11:22:07     WS90200003     @5B@     SWW_WI_CREATE_VIA_EVENT_IBF
    QCYBUS2012     CREATED     12.05.2008     11:22:08          @AI@     No receiver entered
    BUS2011     QUOTATIONCREATED     12.05.2008     11:22:08          @AI@     No receiver entered
    BUS2012     RELEASESTEPCREATED     12.05.2008     11:22:08     WS90200003     @5B@     SWW_WI_CREATE_VIA_EVENT_IBF
    BUS2012     RELEASESTEPCREATED     12.05.2008     11:22:10     WS90200003     @AI@     Event put in queue
    BUS2012     RELEASESTEPCREATED     12.05.2008     11:22:10     WS90200003     @5C\QFeedback after error@     Feedback after error
    FREBUS2012     CREATED     12.05.2008     11:22:08          @AI@     No receiver entered
    Upon creating contract i got following trace, quite similar to one before:
    BUS2014     RELEASESTEPCREATED     12.05.2008     11:34:31     WS90200004     @5B@     SWW_WI_CREATE_VIA_EVENT_IBF
    QCYBUS2012     CREATED     12.05.2008     11:34:31          @AI@     No receiver entered
    BUS2011     QUOTATIONCREATED     12.05.2008     11:34:31          @AI@     No receiver entered
    BUS2012     RELEASESTEPCREATED     12.05.2008     11:34:31     WS90200003     @5B@     SWW_WI_CREATE_VIA_EVENT_IBF
    BUS2012     RELEASESTEPCREATED     12.05.2008     11:34:31     WS90200003     @AI@     Event put in queue
    BUS2012     RELEASESTEPCREATED     12.05.2008     11:34:31     WS90200003     @5C\QFeedback after error@     Feedback after error
    FREBUS2012     CREATED     12.05.2008     11:34:31          @AI@     No receiver entered
    There are no duplicate entries in 'SWETYPL', agent assignments seem fine, WF customizing is OK.
    Somehow it is not clear for me why or how my 'WS90200003' with BUS2012 keeps triggering.
    When i look in 'Feedback after error' message i see that release code is missing for BUS2012, but weird thing is
    that in contract creation it tries to pass contract document number in event BUS2012...
    I don't know why BUS2012 is constantly double-triggering.
    Not to forget, i'm working on ECC 6.0.
    Thank you for the contribution and tips.
    Greets,
    Tom

    Hi,
    I am using multi-step release strategies, but i'm not sure what you mean...
    Aren't release codes determined from customizing upon saving the document?
    I've checked the customizing and there is only 1 release code that can be
    used by the agent who gets workitem.
    In "Feeback afrer error" log in second calling of BUS2012 there is no release code at all...
    Regards, Tom

  • Purchase order Print preview Problem in ME23N

    Hi all,
    We are trying to see print preview of purchase order in ME23N, but, when we press print preview button another window named "SAPLPD" is poping up. The pop-up window looks like command propmt window and contains lines like
    "(11:25:54 AM) Icon DLL loaded.
    (11:25:54 AM)
    (11:25:54 AM) Network Communication via SAP-NiLib
    (11:25:54 AM) Hostname: L04WSChe0300
    (11:25:54 AM) IP Address: 10.87.7.11
    (11:25:54 AM)
    (11:25:54 AM) SAPLPD Version 6.28 for Windows/NT (OPT) is listening
    (11:25:54 AM) OS-Info: version = 5.1, build = 0/2600, text = Service Pack 2
    (11:25:54 AM) Copyright © 1992-2001 SAP AG
    (11:25:54 AM)
    (11:26:04 AM)
    (11:26:04 AM) Receive job for printer __DEFAULT (Berkeley LPD protocol / RFC1179)
    (11:26:04 AM) send_status called
    (11:26:05 AM) send_status called
    (11:26:05 AM) send_status called
    (11:26:07 AM) send_status called
    (11:26:07 AM) send_status called
    (11:26:07 AM) Job 000jgjJp.DEV for user DEV2 queued.
    (11:26:07 AM) Start printing job 000jgjJp.DEV on printer MICROSOFT OFFICE DOCUMENT IMAGE WRITER
    (11:26:13 AM) Error: Unable to start print job, Windows rc = -2, Error = Overlapped I/O operation is in progress.
    (11:26:13 AM) Error: BG: saplpd_open_dc failed, msg = 808 SAPLPD:Windows Problem, siehe SAPLPD Protokoll
    How can I fix this problem and see print preview of purchase order in ME23N.
    Please help me!
    Thanks,
    Rajan

    hi,
    DATA: w_compop    TYPE ssfcompop.
    w_compop-tdimmed   = ' '.     "Print Immediately control parameter should be empty..
    Then only print preview pop-up will come..
    then call your smartform like this..
    CALL FUNCTION fnam
        EXPORTING
          control_parameters = w_ctrlop
          output_options     = w_compop
              TABLES
          it_vbdkr           = it_tvbdkr[]
          it_vbdpr           = tvbdpr[]
          it_zglentitycode   = it_zglentitycode[].
    regards
    vijay

  • Viewing purchase order sapscript

    Hai all,
      I have make some changes in the MEDRUCK sapcript for purchase order as per client requirement  and now I want to see the print preview of my customised sapscript and i have created a purchase order with this  output type for print out.
      Could any one of you you say how this print out can be seen. Is ME9F is enough to see the print output or whether I have to do something else to see the output.
    Thanks in advance,
    S.Jenibalet.

    Hi Jenibalet,
    Goto to the Tcode NACE and assign the the Print program and layout set which you have created.
    And then you follow the usual procedure you can get the output of your new Medruck layout.Let me know if you face any further issues.
    Regards,
    Dinesh

  • Purchase order date posting problems

    Hi all,
    I have done an interface to post purchase/ sales order into sap. ive populated fields correctly into the segments and executed the fm. its posting all the data except the purchase order date in the header. i dont know why its doing dat. the field is populated into the segments and i can see it. but its not getting reflected in the order created .. can somebody help me with this. ive used date segment e1edk03 qualifier 22 field is iddat.
    thanks,
    kishore.

    Hi,
    Im using orders 05.. FM idoc_input_orders
    Create Document header date segment - E1EDK03
    *. I.e. set header level required delivery date
      e1edk03-iddat = c_edi_iddat_002.
      e1edk03-datum = date_required.  "Set the date required
      PERFORM add_segment USING c_segnam_e1edk03 e1edk03.
    Header Level Customer purchase order date
      e1edk03-iddat = c_edi_iddat_022.  " default value 22.
      e1edk03-datum = cust_po_date.
      PERFORM add_segment USING c_segnam_e1edk03 e1edk03.
    Header Level Pricing Date
      e1edk03-iddat = c_edi_iddat_023.
      e1edk03-datum = pricing_date.
      PERFORM add_segment USING c_segnam_e1edk03 e1edk03.
    Wat i could observe from fm idoc_input_orders fm , fm is not posting in the purchase order date for identifier 22.. u can have a look at it if u want.. include LVEDAF5W
    is there any way to post this date plz
    thanks

  • Purchase order - print preview problem

    Hi friends,
    i have created  a Purchase Order, when im trying to view the print preview, im getting the message ' <b>Specify address number or Address handle'</b> .
    Please specify where i have to give these details in PO.
    Regards
    kumar.

    Depends on what address information you are displaying on the Smartform if you are displaying the Plant address then you have to go to T001W and pick up the ADRNR from the Same table and display it in the Smartform Address Window same thing for the Vendor address you have to pick up the ADRNR in the LFA1 for that particular Vendor.. Remember to check if the ADRNR is not initial before you display a address window..
    Hope That Helps
    Anirban M.

  • Text Printing in Purchase Order SapScript

    Hi Abapers,
    I am chaniging an existing SapScript that was not working properly. Client wants to print "Item Text" in output which is of 3 to 4 page. where as there is only one line item in PO. Also there is "Header Text"  of 1 page. Client wants to display all line items then "Item Text" should displayed. and at last the "eader Text". The Format is Like as Follows:-
    PO No.                           12.12.2006
    Vendor Name
    Country
    S.No.     Mat. Desc.                          Qty. ...............and so on..........
    1            abc                                    11 .....................
    Item Text starts from here........................
    Problem is here
    This text is of 3 page (say).
    So text starts from here and est of text goes to next page.
    Only 4 Lines are printed properly and rest of lines are not printed.
    I also checked in debuging mode.
    so attachibng the code for reference kindly go through this.
    Header Text Starts from here
       Total amt.  in words......
    *******************************8Code**************************************
      IF &NEXTPAGE& EQ 0
      PROTECT
      PERFORM READ_TEXTS IN PROGRAM ZPERFORMS_ZMEDRUCK1
      USING &EKKO-EBELN&
      CHANGING &WRK_IT1&
      CHANGING &WRK_IT2&
      CHANGING &WRK_IT3&
      CHANGING &WRK_IT4&
      CHANGING &WRK_IT5&
      CHANGING &WRK_IT6&
      CHANGING &WRK_IT7&
      CHANGING &WRK_IT8&
      CHANGING &WRK_IT9&
      CHANGING &WRK_IT10&
      CHANGING &WRK_IT11&
      CHANGING &WRK_IT12&
      ENDPERFORM
      PROTECT
      IF &WRK_IT1& NE ' '
      <S>&WRK_IT1&</>
      ENDIF
      IF &WRK_IT2& NE ' '
      <S>&WRK_IT2&</>
    and so on..............
    then i also go to the Calling program.
    FORM READ_TEXTSLO1 TABLES IN_TAB200  STRUCTURE ITCSY
                           OUT_TAB200 STRUCTURE ITCSY.
      READ TABLE IN_TAB200 INDEX 1.
      EBELN1 = IN_TAB200-VALUE.
      READ TABLE IN_TAB200 INDEX 2.
      EBELP = IN_TAB200-VALUE.
      CONCATENATE EBELN1 EBELP INTO OBJNAME.
      CLEAR WRK_IT1.
      CLEAR WRK_IT2.
      CLEAR WRK_IT3.
      CLEAR WRK_IT4.
      CLEAR WRK_IT5.
      CLEAR WRK_IT6.
      CLEAR WRK_IT7.
      CLEAR WRK_IT8.
      CLEAR WRK_IT9.
      CLEAR WRK_IT10.
      CLEAR WRK_IT11.
      CLEAR WRK_IT12.
      CLEAR WRK_IT13.
      CLEAR WRK_IT14.
      CLEAR WRK_IT15.
      CLEAR WRK_IT16.
      CLEAR WRK_IT17.
      CLEAR WRK_IT18.
      CLEAR WRK_IT19.
      CLEAR WRK_IT20.
      CLEAR WRK_IT21.
      CLEAR WRK_IT22.
      CLEAR WRK_IT23.
      CLEAR WRK_IT24.
      CLEAR WRK_IT25.
      CLEAR WRK_IT26.
      CLEAR WRK_IT27.
      CLEAR WRK_IT28.
      CLEAR WRK_IT29.
      CLEAR WRK_IT30.
      CLEAR WRK_IT31.
      CLEAR WRK_IT32.
      CLEAR WRK_IT33.
      CLEAR WRK_IT34.
      CLEAR WRK_IT35.
      CLEAR WRK_IT36.
      CLEAR WRK_IT37.
      CLEAR WRK_IT38.
      CLEAR WRK_IT39.
      CLEAR WRK_IT40.
      CLEAR WRK_IT41.
      CLEAR WRK_IT42.
      CLEAR WRK_IT43.
      CLEAR WRK_IT44.
      CLEAR WRK_IT45.
      CLEAR WRK_IT46.
      CLEAR WRK_IT47.
      CLEAR WRK_IT48.
      CLEAR WRK_IT49.
      CLEAR WRK_IT50.
      CLEAR WRK_IT51.
      CLEAR WRK_IT52.
      CLEAR WRK_IT53.
      CLEAR WRK_IT54.
      CLEAR WRK_IT55.
      CLEAR WRK_IT56.
      CLEAR WRK_IT57.
      CLEAR WRK_IT58.
      CLEAR WRK_IT59.
      CLEAR WRK_IT60.
      CLEAR WRK_IT61.
      CLEAR WRK_IT62.
      CLEAR WRK_IT63.
      CLEAR WRK_IT64.
      CLEAR WRK_IT65.
      CLEAR WRK_IT66.
      CLEAR WRK_IT67.
      CLEAR WRK_IT68.
      CLEAR WRK_IT69.
      CLEAR WRK_IT70.
      CLEAR WRK_IT71.
      CLEAR WRK_IT72.
      CLEAR WRK_IT73.
      CLEAR WRK_IT74.
      CLEAR WRK_IT75.
      CLEAR WRK_IT76.
      CLEAR WRK_IT77.
      CLEAR WRK_IT78.
      CLEAR WRK_IT79.
      CLEAR WRK_IT80.
    break abap7.
    ITEM TEXT.
      SELECT SINGLE TDNAME INTO WRK_TDNAME FROM STXH
        WHERE TDOBJECT = 'EKPO'
        AND TDNAME = OBJNAME
        AND TDID EQ 'F01'.
      IF SY-SUBRC = 0.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            CLIENT   = SY-MANDT
            ID       = 'F01'
            LANGUAGE = 'E'
            NAME     = OBJNAME
            OBJECT   = 'EKPO'
          TABLES
            LINES    = IT_LINE.
        IF SY-SUBRC = 0.
         delete it_line where tdline EQ ' '.
    BREAK ABAP7.
         DESCRIBE TABLE it_line LINES wrk_lines1.
          LOOP AT IT_LINE.
            CLEAR WRK_TABIX.
            WRK_TABIX = SY-TABIX.
            IF WRK_TDLINE EQ ' '.
              WRK_TDLINE = IT_LINE-TDLINE.
            ELSE.
              CONCATENATE  WRK_TDLINE IT_LINE-TDLINE INTO  WRK_TDLINE
              SEPARATED BY SPACE.
            ENDIF.
            Y = STRLEN( WRK_TDLINE ).
            CALL FUNCTION 'RKD_WORD_WRAP'
                   EXPORTING
                     TEXTLINE                  = WRK_TDLINE
                     DELIMITER                 = ' '
                     OUTPUTLEN                 = 100
                  IMPORTING
                    OUT_LINE1                 = OUT_LINE1
                    OUT_LINE2                 = OUT_LINE2
                    OUT_LINE3                 = OUT_LINE3
              OUT_LINE3                 =
            TABLES
              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.
    *break abap7.
            CASE WRK_TABIX.
              WHEN 1 .
                WRK_IT1 = OUT_LINE1.
              WHEN 2 .
                WRK_IT2 = OUT_LINE1.
              WHEN 3 .
                WRK_IT3 = OUT_LINE1.
              WHEN 4 .
                WRK_IT4 = OUT_LINE1.
            ENDCASE.
            IF OUT_LINE3 EQ ' '.
              WRK_TDLINE = OUT_LINE2.
            ELSE.
              CONCATENATE OUT_LINE2 OUT_LINE3 INTO WRK_TDLINE
              SEPARATED BY SPACE.
            ENDIF.
          ENDLOOP.
          IF WRK_IT4 NE ' '.
            Y = STRLEN( WRK_TDLINE ).
            IF Y GT 50.
              CALL FUNCTION 'RKD_WORD_WRAP'
                       EXPORTING
                         TEXTLINE                  = WRK_TDLINE
                         DELIMITER                 = ' '
                         OUTPUTLEN                 = 50
                      IMPORTING
                        OUT_LINE1                 = OUT_LINE1
                        OUT_LINE2                 = OUT_LINE2
                        OUT_LINE3                 = OUT_LINE3
              OUT_LINE3                 =
            TABLES
              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.
              wrk_it4 = out_line1.              " Change Uncommented"
              WRK_ITA = OUT_LINE1.
              WRK_ITA4 = OUT_LINE2.
            ELSE.
              WRK_ITA = WRK_TDLINE.
            ENDIF.
          ENDIF.
        ENDIF.
        CLEAR WRK_TDLINE.
        CLEAR OUT_LINE1.
        CLEAR OUT_LINE2.
        CLEAR OUT_LINE3.
        OUT_TAB200-VALUE = WRK_IT1.
        MODIFY OUT_TAB200 INDEX 1 TRANSPORTING VALUE.
        OUT_TAB200-VALUE = WRK_IT2.
        MODIFY OUT_TAB200 INDEX 2 TRANSPORTING VALUE.
        OUT_TAB200-VALUE = WRK_IT3.
        MODIFY OUT_TAB200 INDEX 3 TRANSPORTING VALUE.
        OUT_TAB200-VALUE = WRK_IT4.
        MODIFY OUT_TAB200 INDEX 4 TRANSPORTING VALUE.
      ENDIF.
    break abap7.  """"""""""""""""""''
      CLEAR IT_LINE.
      REFRESH IT_LINE.
      SELECT SINGLE TDNAME INTO WRK_TDNAME FROM STXH
         WHERE TDOBJECT = 'EKPO'
         AND TDNAME = OBJNAME
         AND TDID EQ 'F02'.
      IF SY-SUBRC = 0.
    break abap7.  """"""""""""""""""''
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            CLIENT   = SY-MANDT
            ID       = 'F02'
            LANGUAGE = 'E'
            NAME     = OBJNAME
            OBJECT   = 'EKPO'
          TABLES
            LINES    = IT_LINE.
         DESCRIBE TABLE it_line LINES wrk_lines2.
        IF SY-SUBRC = 0.
          LOOP AT IT_LINE.
            CLEAR WRK_TABIX.
            WRK_TABIX = SY-TABIX.
            IF WRK_TDLINE EQ ' '.
              WRK_TDLINE = IT_LINE-TDLINE.
            ELSE.
              CONCATENATE  WRK_TDLINE IT_LINE-TDLINE INTO  WRK_TDLINE.
            ENDIF.
            CALL FUNCTION 'RKD_WORD_WRAP'
                   EXPORTING
                     TEXTLINE                  = WRK_TDLINE
                     DELIMITER                 = ' '
                     OUTPUTLEN                 = 50
                  IMPORTING
                    OUT_LINE1                 = OUT_LINE1
                    OUT_LINE2                 = OUT_LINE2
                    OUT_LINE3                 = OUT_LINE3
              OUT_LINE3                 =
            TABLES
              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.
            CASE WRK_TABIX.
              WHEN 1 .
                WRK_IT5 = OUT_LINE1.
              WHEN 2 .
                WRK_IT6 = OUT_LINE1.
              WHEN 3 .
                WRK_IT7 = OUT_LINE1.
              WHEN 4 .
                WRK_IT8 = OUT_LINE1.
            ENDCASE.
            IF OUT_LINE3 EQ ' '.
              WRK_TDLINE = OUT_LINE2.
            ELSE.
              CONCATENATE OUT_LINE2 OUT_LINE3 INTO WRK_TDLINE
              SEPARATED BY SPACE.
            ENDIF.
          ENDLOOP.
          IF WRK_IT8 NE ' '.
            Y = STRLEN( WRK_TDLINE ).
            IF Y GT 50.
              CALL FUNCTION 'RKD_WORD_WRAP'
                       EXPORTING
                         TEXTLINE                  = WRK_TDLINE
                         DELIMITER                 = ' '
                         OUTPUTLEN                 = 50
                      IMPORTING
                        OUT_LINE1                 = OUT_LINE1
                        OUT_LINE2                 = OUT_LINE2
                        OUT_LINE3                 = OUT_LINE3
              OUT_LINE3                 =
            TABLES
              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.
           wrk_it8 = out_line1.
              WRK_ITB = OUT_LINE1.
              WRK_ITB8 = OUT_LINE2.
            ELSE.
              WRK_ITB = WRK_TDLINE.
            ENDIF.
          ENDIF.
          CLEAR WRK_TDLINE.
          CLEAR OUT_LINE1.
          CLEAR OUT_LINE2.
          CLEAR OUT_LINE3.
          MODIFY OUT_TAB200 INDEX 5 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT6.
          MODIFY OUT_TAB200 INDEX 6 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT7.
          MODIFY OUT_TAB200 INDEX 7 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT8.
          MODIFY OUT_TAB200 INDEX 8 TRANSPORTING VALUE.
        ENDIF.
      ENDIF.
      CLEAR IT_LINE.
      REFRESH IT_LINE.
      SELECT SINGLE TDNAME INTO WRK_TDNAME FROM STXH
        WHERE TDOBJECT = 'EKPO'
        AND TDNAME = OBJNAME
        AND TDID EQ 'F03'.
      IF SY-SUBRC = 0.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            CLIENT   = SY-MANDT
            ID       = 'F03'
            LANGUAGE = 'E'
            NAME     = OBJNAME
            OBJECT   = 'EKPO'
          TABLES
            LINES    = IT_LINE.
        IF SY-SUBRC = 0.
          LOOP AT IT_LINE.
            CLEAR WRK_TABIX.
            WRK_TABIX = SY-TABIX.
            IF WRK_TDLINE EQ ' '.
              WRK_TDLINE = IT_LINE-TDLINE.
            ELSE.
              CONCATENATE  WRK_TDLINE IT_LINE-TDLINE INTO  WRK_TDLINE.
            ENDIF.
            CALL FUNCTION 'RKD_WORD_WRAP'
                   EXPORTING
                     TEXTLINE                  = WRK_TDLINE
                     DELIMITER                 = ' '
                     OUTPUTLEN                 = 50
                  IMPORTING
                    OUT_LINE1                 = OUT_LINE1
                    OUT_LINE2                 = OUT_LINE2
                    OUT_LINE3                 = OUT_LINE3
              OUT_LINE3                 =
            TABLES
              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.
            CASE WRK_TABIX.
              WHEN 1 .
                WRK_IT9 = OUT_LINE1.
              WHEN 2 .
                WRK_IT10 = OUT_LINE1.
              WHEN 3 .
                WRK_IT11 = OUT_LINE1.
              WHEN 4 .
                WRK_IT12 = OUT_LINE1.
            ENDCASE.
            IF OUT_LINE3 EQ ' '.
              WRK_TDLINE = OUT_LINE2.
            ELSE.
              CONCATENATE OUT_LINE2 OUT_LINE3 INTO WRK_TDLINE
              SEPARATED BY SPACE.
            ENDIF.
          ENDLOOP.
          IF WRK_IT12 NE ' '.
            Y = STRLEN( WRK_TDLINE ).
            IF Y GT 50.
              CALL FUNCTION 'RKD_WORD_WRAP'
                       EXPORTING
                         TEXTLINE                  = WRK_TDLINE
                         DELIMITER                 = ' '
                         OUTPUTLEN                 = 50
                      IMPORTING
                        OUT_LINE1                 = OUT_LINE1
                        OUT_LINE2                 = OUT_LINE2
                        OUT_LINE3                 = OUT_LINE3
              OUT_LINE3                 =
            TABLES
              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.
           wrk_it12 = out_line1.
              WRK_ITC = OUT_LINE1.
              WRK_ITC12 = OUT_LINE2.
            ELSE.
              WRK_ITC = WRK_TDLINE.
            ENDIF.
          ENDIF.
          CLEAR WRK_TDLINE.
          CLEAR OUT_LINE1.
          CLEAR OUT_LINE2.
          CLEAR OUT_LINE3.
          OUT_TAB200-VALUE = WRK_IT9.
          MODIFY OUT_TAB200 INDEX 9 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT10.
          MODIFY OUT_TAB200 INDEX 10 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT11.
          MODIFY OUT_TAB200 INDEX 11 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT12.
          MODIFY OUT_TAB200 INDEX 12 TRANSPORTING VALUE.
        ENDIF.
      ENDIF.
      CLEAR IT_LINE.
      REFRESH IT_LINE.
      SELECT SINGLE TDNAME INTO WRK_TDNAME FROM STXH
        WHERE TDOBJECT = 'EKPO'
        AND TDNAME = OBJNAME
        AND TDID EQ 'F04'.
      IF SY-SUBRC = 0.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            CLIENT   = SY-MANDT
            ID       = 'F04'
            LANGUAGE = 'E'
            NAME     = OBJNAME
            OBJECT   = 'EKPO'
          TABLES
            LINES    = IT_LINE.
        IF SY-SUBRC = 0.
          LOOP AT IT_LINE.
            CLEAR WRK_TABIX.
            WRK_TABIX = SY-TABIX.
            IF WRK_TDLINE EQ ' '.
              WRK_TDLINE = IT_LINE-TDLINE.
            ELSE.
              CONCATENATE  WRK_TDLINE IT_LINE-TDLINE INTO  WRK_TDLINE.
            ENDIF.
            CALL FUNCTION 'RKD_WORD_WRAP'
                   EXPORTING
                     TEXTLINE                  = WRK_TDLINE
                     DELIMITER                 = ' '
                     OUTPUTLEN                 = 50
                  IMPORTING
                    OUT_LINE1                 = OUT_LINE1
                    OUT_LINE2                 = OUT_LINE2
                    OUT_LINE3                 = OUT_LINE3
              OUT_LINE3                 =
            TABLES
              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.
            CASE WRK_TABIX.
              WHEN 1 .
                WRK_IT13 = OUT_LINE1.
              WHEN 2 .
                WRK_IT14 = OUT_LINE1.
              WHEN 3 .
                WRK_IT15 = OUT_LINE1.
              WHEN 4 .
                WRK_IT16 = OUT_LINE1.
            ENDCASE.
            IF OUT_LINE3 EQ ' '.
              WRK_TDLINE = OUT_LINE2.
            ELSE.
              CONCATENATE OUT_LINE2 OUT_LINE3 INTO WRK_TDLINE
              SEPARATED BY SPACE.
            ENDIF.
          ENDLOOP.
          IF WRK_IT16 NE ' '.
            Y = STRLEN( WRK_TDLINE ).
            IF Y GT 50.
              CALL FUNCTION 'RKD_WORD_WRAP'
                       EXPORTING
                         TEXTLINE                  = WRK_TDLINE
                         DELIMITER                 = ' '
                         OUTPUTLEN                 = 50
                      IMPORTING
                        OUT_LINE1                 = OUT_LINE1
                        OUT_LINE2                 = OUT_LINE2
                        OUT_LINE3                 = OUT_LINE3
              OUT_LINE3                 =
            TABLES
              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.
           wrk_it16 = out_line1.
              WRK_ITD = OUT_LINE1.
              WRK_ITD16 = OUT_LINE2.
            ELSE.
              WRK_ITD = WRK_TDLINE.
            ENDIF.
          ENDIF.
          CLEAR WRK_TDLINE.
          CLEAR OUT_LINE1.
          CLEAR OUT_LINE2.
          CLEAR OUT_LINE3.
          OUT_TAB200-VALUE = WRK_IT13.
          MODIFY OUT_TAB200 INDEX 13 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT14.
          MODIFY OUT_TAB200 INDEX 14 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT15.
          MODIFY OUT_TAB200 INDEX 15 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT16.
          MODIFY OUT_TAB200 INDEX 16 TRANSPORTING VALUE.
        ENDIF.
      ENDIF.
      CLEAR IT_LINE.
      REFRESH IT_LINE.
      SELECT SINGLE TDNAME INTO WRK_TDNAME FROM STXH
       WHERE TDOBJECT = 'EKPO'
       AND TDNAME = OBJNAME
       AND TDID EQ 'F05'.
      IF SY-SUBRC = 0.
        CALL FUNCTION 'READ_TEXT'
          EXPORTING
            CLIENT   = SY-MANDT
            ID       = 'F05'
            LANGUAGE = 'E'
            NAME     = OBJNAME
            OBJECT   = 'EKPO'
          TABLES
            LINES    = IT_LINE.
        IF SY-SUBRC = 0.
          LOOP AT IT_LINE.
            CLEAR WRK_TABIX.
            WRK_TABIX = SY-TABIX.
            IF WRK_TDLINE EQ ' '.
              WRK_TDLINE = IT_LINE-TDLINE.
            ELSE.
              CONCATENATE  WRK_TDLINE IT_LINE-TDLINE INTO  WRK_TDLINE.
            ENDIF.
            CALL FUNCTION 'RKD_WORD_WRAP'
                   EXPORTING
                     TEXTLINE                  = WRK_TDLINE
                     DELIMITER                 = ' '
                     OUTPUTLEN                 = 50
                  IMPORTING
                    OUT_LINE1                 = OUT_LINE1
                    OUT_LINE2                 = OUT_LINE2
                    OUT_LINE3                 = OUT_LINE3
              OUT_LINE3                 =
            TABLES
              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.
            CASE WRK_TABIX.
              WHEN 1 .
                WRK_IT17 = OUT_LINE1.
              WHEN 2 .
                WRK_IT18 = OUT_LINE1.
              WHEN 3 .
                WRK_IT19 = OUT_LINE1.
              WHEN 4 .
                WRK_IT20 = OUT_LINE1.
            ENDCASE.
            IF OUT_LINE3 EQ ' '.
              WRK_TDLINE = OUT_LINE2.
            ELSE.
              CONCATENATE OUT_LINE2 OUT_LINE3 INTO WRK_TDLINE
              SEPARATED BY SPACE.
            ENDIF.
          ENDLOOP.
          IF WRK_IT20 NE ' '.
            Y = STRLEN( WRK_TDLINE ).
            IF Y GT 50.
              CALL FUNCTION 'RKD_WORD_WRAP'
                       EXPORTING
                         TEXTLINE                  = WRK_TDLINE
                         DELIMITER                 = ' '
                         OUTPUTLEN                 = 50
                      IMPORTING
                        OUT_LINE1                 = OUT_LINE1
                        OUT_LINE2                 = OUT_LINE2
                        OUT_LINE3                 = OUT_LINE3
              OUT_LINE3                 =
            TABLES
              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.
           wrk_it20 = out_line1.
              WRK_ITE = OUT_LINE1.
              WRK_ITE20 = OUT_LINE2.
            ELSE.
              WRK_IT20 = WRK_TDLINE.
            ENDIF.
          ENDIF.
          CLEAR WRK_TDLINE.
          CLEAR OUT_LINE1.
          CLEAR OUT_LINE2.
          CLEAR OUT_LINE3.
          OUT_TAB200-VALUE = WRK_IT17.
          MODIFY OUT_TAB200 INDEX 17 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT18.
          MODIFY OUT_TAB200 INDEX 18 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT19.
          MODIFY OUT_TAB200 INDEX 19 TRANSPORTING VALUE.
          OUT_TAB200-VALUE = WRK_IT20.
          MODIFY OUT_TAB200 INDEX 20 TRANSPORTING VALUE.
        ENDIF.
      ENDIF.
      OUT_TAB200-VALUE = WRK_ITA.
      MODIFY OUT_TAB200 INDEX 81 TRANSPORTING VALUE.
      OUT_TAB200-VALUE = WRK_ITB.
      MODIFY OUT_TAB200 INDEX 82 TRANSPORTING VALUE.
      OUT_TAB200-VALUE = WRK_ITC.
      MODIFY OUT_TAB200 INDEX 83 TRANSPORTING VALUE.
      OUT_TAB200-VALUE = WRK_ITD.
      MODIFY OUT_TAB200 INDEX 84 TRANSPORTING VALUE.
      OUT_TAB200-VALUE = WRK_ITE.
      MODIFY OUT_TAB200 INDEX 85 TRANSPORTING VALUE.
      OUT_TAB200-VALUE = WRK_ITA4.
      MODIFY OUT_TAB200 INDEX 86 TRANSPORTING VALUE.
      OUT_TAB200-VALUE = WRK_ITB8.
      MODIFY OUT_TAB200 INDEX 87 TRANSPORTING VALUE.
      OUT_TAB200-VALUE = WRK_ITC12.
      MODIFY OUT_TAB200 INDEX 88 TRANSPORTING VALUE.
      OUT_TAB200-VALUE = WRK_ITD16.
      MODIFY OUT_TAB200 INDEX 89 TRANSPORTING VALUE.
      OUT_TAB200-VALUE = WRK_ITE20.
      MODIFY OUT_TAB200 INDEX 90 TRANSPORTING VALUE.
      CLEAR IT_LINE.
      REFRESH IT_LINE.
    ENDFORM.                    "read_textslo1
    So kindly review this and let me know what should i do ?
    Helpful answer rewarded.
    Regards
    Robin

    It is very confusing to read your code. If possible please post it in
    block formatted properly.
    If I read it right, looks like you have your texts in PROTECT ENDPROTECT block. If that is the case, then your text will not be written in multiple pages because the PROTECT ENDPROTECT statements will try to fit all the text on one page.
    Hope that helps.
    Regards,
    -Ramesh

  • MDM Old purchase Order and Template Problem

    Hello,
    We are on SRM 5 (SP12) and using MDM catalog.
    We have a problem when we want to create an e-catalog shopping cart in copy of an old one which was correct.
    The price of the new shopping cart get to 0 but in the old shopping cart it was 23,23....
    Can somebody knows how can we solve this issue?
    Thanks!

    Hello,
    We have also SRM 5 SP12 with SRM-MDM catalog 2.0 SP02 Patch 4 and have opened an OSS message to SAP on this issue.
    They have been able to reproduce the problem on their test system and it has been transmitted to their development team.
    It should be available in a next Patch
    Kind regards
    JC

  • Purchase order sapscript version number

    Hi friends,
    I am customizing a medruck sapscript form. One of my requirements is to get the version number on the form when it is changed. Can you tell me what field gives the version number of the form? I tried with 'revno' field but no luck!
    Thank you very much,
    Krishen

    Thanks Ferry. I think this example works for smartform.
    Can you guys tell me what is the significance of field 'revno' ? I am guessing that SAP may provide some field for this purpose in sapscript. Is there any simpler way for this purpose?
    Thank you very much again.
    Message was edited by:
            Krishen 81

  • Upload and Download of Purchase Orders - Account Assignments problem

    Hi SRM Gurus,
    While downloading the SRM PO into Excel format, Account Assignment is not being downloaded.
    Our requirement is, To add many line items in the downloaded excel and subsequently upload to SRM. However the file structure readability is very poor even after installed Add In given by SAP. Can anyone help me in providing a solution, so that the users can be able to insert the line items and upload.
    Thanks & Regards,
    Ramkumar

    Hi
    <u>Please read this -></u>
    <b>Please see the note mentioned below.</b>
    <u>
    Note 734060 SRM:Upload and Download of Documents using MS Excel
    Note 734946 SRM: Restriction on upload and download.</u>
    <b>Alternativey, try using BBP_DOWNLOAD_BADI in SE18 Transaction.</b>
    Upload PO from XML file in SRM
    Upload + Download in Bid invitation
    Re: Contract Upload to New System
    Re: Bid download to Excel
    Re: Upload new Contracts in SRM4.0
    Contract Upload Scenario
    Re: Upload of contracts from text file or spreadsheet
    Regards
    - Atul

  • Problem with services hierarchy and purchase order

    Hi I'm in Srm 7 EHP8(classic scenario) and i have a problem with services hierarchies:
    I create a Purchase requisition in ECC with the next structure:
    1.Hier
    1.1 Serv1
    1.2 Serv2
    1.3 Serv3
    Then I upload this PR to SRM(I activated the BBP_EXTLOCALPO_BADI to change to the Extended-classic scenario to upload correctly the hierarchy)
    and in the SOCO  I only choose the position 1.1 Serv1 and create a purchase order.
    The problem is the purchase order created in ECC contain all the services of the purchase requisition, not only the service I choose(1.1 Serv1) to create the purchase order, in SRM the purchase order is correct with only one position(1.1 Serv1)
    Any Idea?.
    Thanks for the help.

    Hi,
    I have the same problem, any new about that?
    Rgs,
    Pedro

  • Payment Term default to Purchase Order

    Dear SAP guru,
    We have problem that payment term is not defaulted to Purchase Order if the Purchase Order is converted from Purchase Requisition.
    If purchase order is directly created in ME21N, the payment term will be defaulted from vendor master. However we have purchase requisition that is released/converted to purchase order, these POs willl not copy over the paymetn term from vendor master.
    Can any one share how to make the PO always default payment term from vendor master eventhough it is converted from purchase requisition?
    Thanks a lot in advance for your kind assisstance.
    rgds
    Dahlia

    Hi Rajesh,
    Thanks for your quick reply. No, the PR is not referenced to contract. The PR is for external process, therefore the flows is asa follow:
    1. Production order creation; for external process system automatically create purchase requisition.
    2. Purchase requisition will have vendor code defaulted from production order routing. In the routing for external process you can define the vendor code.
    3. Convert the purchase requisition into purchase order.
    The problem the purchase order will not have payment term default from vendor master.
    Thks
    Dahlia

  • Cant able to do UD for Goods Receipt Inspection against Purchase Order

    Hi Experts,
    I am facing problem while doing UD for Goods Receipt Inspection against Purchase Order.
    The Problem is,
    "Selected set code does not exist, or data entered is incomplete
    Message no. QV121
    Diagnosis
    Code  in code group * (selected set 1000 in plant ) does not exist.
    Procedure
    Enter a valid combination or complete combination, or make sure that the combination is available in the selected set."
    And the Result Recording for Inspection lot is completed.
    kindly suggest..
    Thanks in Advance,
    Naveen

    Hi Naveen,
    1.     Go to QCC0 > Quality inspection  >  Inspection lot creation  > Maintain Inspection Types > Select 01 (or the type which you are using) and double click on it.
    2.     Check what code is maintained in UD Selected Set
    3.     Create the same code in QS51 for your plant.
    Regards,
    Anand Rao

  • Update ZPURCHASE THROUGH BADI .. at the time of saving Purchase Order

    Dear All Gurus,
    I have a situation wherein i have to save the Purchase Order Details in My DB table (ZPURCHASE ) at the time of Purchase Order Creation through BADI...
    Fields of ZPURCHASE are (Mandt,EBELN,BUKRS)
    Can some one guide me how can i achieve this..
    I tried doing it through User Exits.. i have written a piece of code when saving the purchase order but my problem is .. The purchase order numbers are generated only after SAVE is complete..
    The other alternative i want to try is through BADI.
    Looking forward for your reply.
    Thanks !!

    > I have a situation wherein i have to save the Purchase Order Details in My DB table (ZPURCHASE ) at the time of Purchase Order Creation through BADI...
    > Fields of ZPURCHASE are (Mandt,EBELN,BUKRS)
    I have no solution for your actual problem (wrong forum, you should try the MM forum) but I wonder why you just don't use the data that is already there in EKKO and EKPO?
    Markus

  • Purchase Order summary for a same PO line items

    Dear All,
    I'm working with SAP script for purchase order. Now problem is that when I give the print from purchase order the data contains several same PO line items, which I don't want printing, but I want summation of their quantities and print them only once.
    I have assigned the print program (SAPFM06P) and my own SAP script form to the required (NEU) output type.
    Please help.
    Regards,
    Frenky

    Hi
    What does "same PO line items" mean?
    That mean several equal PO line items with the same: material, description, price and  delivery date, but with different order quantity.
    I want to summarize all that equal PO line items depending on order quantity and print that total.
    Example for this problem is below.
    Best regards,
    Frenky
    Item    Material     Description
                   Net value                       Price               Order qty.   Unit                Delivery date
    10        646646      HOOD IDG915E/ELICA
                    3.644,10                       364,41                10,000      PC                  13.01.2006
    20        646646      HOOD IDG915E/ELICA
                    5.466,15                       364,41                15,000      PC                  13.01.2006
                                                   Total Order qty.:      25,000      PC
    30         ……..
    Total net value:        10.330,65   EUR

Maybe you are looking for

  • STO - Delivery - Incorrect PO history update

    Hi Experts, I have created an STO. STO quantity is 100 TO. A Delivery is created using the BAPI BAPI_DELIVERYPROCESSING_EXE. Delivery quantity is 9000 KG. PO history should show the delivery quantity as 9 TO. However, it shows as 9000 TO. What could

  • Bug report & possible patch: Wrong memory allocation when using BerkeleyDB in concurrent processes

    When using the BerkeleyDB shared environment in parallel processes, the processes get "out of memory" error, even when there is plenty of free memory available. This results in possible database corruption. Typical use case when this bug manifests is

  • Dynamic queryin based on number of inputs provided

    I have 7 columns in a tables for which the user can put in values in the fields in the front end and query. The 7 columns have 7 corresponding fields in the front end. But the querying has to be dynamic ... i.e the user does not have to enter all the

  • CSS 11501 - Balancing vs. Sorry Server

    Hi, I need a little advice. I have configured my test CSS box with two services. I enabled keepalives and load balancing with one server having a weight of 5, while the other is set to the default. Testing has proven successfull in redirecting reques

  • Loading Smartlist members using ODI

    Hi John, What we choose in data type field for Smart List members. I choose SmartList. But it is giving errors. Thanks and Regards, Sravan Kumar.