Skip to Content
avatar image
Former Member

SAP Scripts : Can any one help out

Hi

I am modifying the existing script of SD_EXPORT_FUSI. The print program is RVADAUS1. In the form layout at the window of a page, if we go to editor to add some field there I found that it is using structure and its fields. To my surprise, I didnt find any query to fetch data in print program. Could you please help me out.

Further by using the FUSI output type, when I click on print preview I didnt get any info on the page. What may be reason and how to modify it with transparent tables. Shall I write my own Print program.

Thank you

Regards

Bhanu

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 22, 2007 at 06:58 AM

    Ho Bhanu...

    There is no need Create or Change the Print program.

    Just Copy the Form (SE71 Utilities->Copy from Client)

    and Make changes in Form .

    You can acheive this by calling a Subroutine from the Layout set using the

    /: PERFORM

    /: ENDPERFORM

    command.

    You can Pass those Strcture fields as Parameters to this Subroutine.

    Create this Subroutine in a new Z program.

    You can find the Thread to know how to Call the Subroutine from Layout.

    <b>Reward if Helpful</b>

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi

      U need to create a routine where the import parameter is the document number and the output parameter is the customer name, u can't insert any check condtion in your script, because you can't make sure to get the record of VBPA for the customer:

      /:   PERFORM GET_NAME IN PROGRAM <ZPROGRAM>
      /:   USING &VBRK-VBELN&
      /:   CHANGING &NAME&
      /:   ENDPERFORM.
      
      FORM GET_NAME TABLES IN_TAB    STRUCTURE ITCSY
                                                 OUT_TAB STRUCTURE ITCSY.
        DATA: VBELN  TYPE VBELN,
                   KUNNR TYPE KUNNR.
      
        READ TABLE IN_TAB WITH KEY NAME = 'VBRK-VBELN'.
        IF SY-SUBRC = 0.
      
         VBELN =  IN_TAB-VALUE.
      
         CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  INPUT  = VBELN
             IMPORTING
                  OUTPUT = VBELN.
        ENDIF.
        
        READ TABLE OUT_TAB WITH KEY NAME = 'NAME'.
        CHECK SY-SUBRC = 0.
      
        SELECT SINGLE KUNNR INTO KUNNR FROM VBPA
                                     WHERE VBELN = VBELN
                                          AND POSNR = '000000'
                                          AND PARVW = 'AG'. 
        SELECT SINGLE NAME1 INTO OUT_TAB-VALUE 
                                     WHERE KUNNR = KUNNR.
        IF SY-SUBRC = 0.
          MODIFY OUT_TAB INDEX SY-TABIX.
        ENDIF.
      ENDFORM.

      Max