08-20-2007 8:12 PM
Hello,
I have a scenario where i have download the file into presentation server with field header like' purchase order number' and so on in the header level and then next below item should be po number.. is there any function module can you for this or how to aceive this scenario as well please your input for same format put in the application server?
thanks,
john.
08-20-2007 8:18 PM
HI John,
This is one method of doing it.
Populate the descriptions of the header in an internal table of the same structure as the data internal table.
Download that internal table using GUI_DOWNLOAD functionmodule.
Then download the actual data to the same file, but in APPEND mode.(Pass APPEND = 'X' in the FM parameters).
Regards,
Ravi Kanth
08-20-2007 9:53 PM
hello friends,
this soluction is not help me out please help me to give some different soluction..
my question is that store CVS format into the application server with header label.
how can i aceive this one..
thanks,
john.
08-21-2007 5:10 AM
Hi..
For Application Server this is the code:
DATA : BEGIN OF IT_HEADER OCCURS 0,
EBELN TYPE EKKO-EBELN,
LIFNR TYPE EKKO-LIFNR,
END OF IT_HEADER.
DATA : BEGIN OF IT_ITEM OCCURS 0,
EBELN TYPE EKKO-EBELN,
MATNR TYPE EKKO-MATNR,
END OF IT_ITEM.
PARAMETERS : P_DSN(40) . "file name
data : v_rec(120) .
START-OF-SELECTION.
SELECT ebeln lifnr FROM EKKO INTO TABLE IT_HEADER.
IF IT_HEADER[] IS NOT INITIAL.
SELECT ebeln matnr FROM EKPO INTO TABLE IT_ITEM FOR ALL ENTRIES IN IT_HEADER WHERE EBELN = IT_HEADER-EBELN.
ENDIF.
OPEN DATASET P_DSN
FOR OUTPUT
IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC NE 0.
Message 'File not opened' type 'E'.
ENDIF.
LOOP AT IT_HEADER .
CONCATENEATE IT_HEADER-EBELN IT_HEADER-LIFNR
INTO V_REC SEPERATED BY ';'.
TRANSFER V_REC TO P_DSN.
LOOP AT IT_ITEM WHERE EBELN = IT_HEADER-EBELN.
CONCATENEATE IT_ITEM-EBELN IT_ITEM-MATNR
INTO V_REC SEPERATED BY ';'.
TRANSFER V_REC TO P_DSN.
ENDLOOP.
ENDLOOP.
CLOSE DATASET P_DSN.
<b>Reward points if helpful</b>
08-20-2007 10:01 PM