08-22-2007 7:50 AM
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
08-22-2007 7: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>
08-22-2007 7: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>
08-24-2007 8:47 AM
The answer is very helpful.
I want to add a field that shows the customer name in another window. I am trying to do it without touching the print program and through subroutine pool.
This is the condition.
Check If VBPA-VBELN = VBRK-VBELN.
Check If VBPA-PARVW = AG.
Capture KNA1-KUNNR where KUNNR = VBPA-KUNNR.
Capture VBPA-NAME1.
Could you please provide the procedure, if possible the code.
Thank you.
08-24-2007 9:00 AM
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