2009 Sep 15 3:05 AM
Hi All,
I have a requirement to add new columns to the standard prg and need to populate data as per the client requirement.
I copied into z program and I have added columns successfully.But confused to poulate data and display.Here they are using ALV to display.Still not clear ,as it is standard program how to display data based on system display-.Needed small example.
Regards
SAISRI
2009 Sep 15 12:16 PM
Hi SAIsrip,
If u check code then there is Include FDEPL00_SHOW. This include has Form Module SHOW_LINE_ITEMS. This is used for displaying output. Here It is calling Form Module INIT_FIELDCAT where field cat is getting populated from structure FAGL_S_RFDEPL00_LIST1 using FM REUSE_ALV_FIELDCATALOG_MERGE. If required you have to make changes here to get your fields in desplay.
I hope this information is much helpful.
Thanks & Regards,
Vaibhav Pendse.
2009 Sep 15 4:29 AM
hai u have copied in to z
then search where the alv is displayed and how the field catalog is built wether it is built using a strucutre or individual fields
if it is built using fields then add ur new fields for catalog and fetch the data for fields and display
m.a
2009 Sep 15 4:57 AM
Hi ,
After Copying the Standard to ZProgram .
You debugg the Zprogram and find the ALV where the Data is been used for output.
There you may Find the Internal Table or Structure Name
Find That Structure and copy it to Zstructure and
add your need fields for that coloumn..
if you need to give the coloumn description of your own
Then set the field name toZfieldname in that structure
Then to give the name for that coloumn..choose the data element and field label give the name
For any clarification Please Revert Back
With Regards,
Vinu.R
2009 Sep 15 5:55 AM
Hi,
Here is the Example :
data: it_output like zrfposxext occurs 0 with header line.
Please Note :
Here rfposxext is the Standard Structure Name
Where i customized to zrfposxext to add my coloumns..
Here I added these Two Fileds to the Structure
KNTTP KNTTP CHAR 1 0 Account Assignment Category
VENCLASS ZVENCLASS CHAR 60 0 Vendor Capex or Opex Classification
and Field Label for Zvenclass is as follows :
Short 10 Vendor
Medium 15 Vendor Class
Long 25 Vendor Classification
Heading 20 Vendor Class
Then In zprogram im passing the it_output to ALV where it contains the two coloumns data
{ call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
it_fieldcat = wa_fieldcat[]
tables
t_outtab = it_output }-->This is the Internal Table
Regards,
Vinu.R
2009 Sep 15 12:16 PM
Hi SAIsrip,
If u check code then there is Include FDEPL00_SHOW. This include has Form Module SHOW_LINE_ITEMS. This is used for displaying output. Here It is calling Form Module INIT_FIELDCAT where field cat is getting populated from structure FAGL_S_RFDEPL00_LIST1 using FM REUSE_ALV_FIELDCATALOG_MERGE. If required you have to make changes here to get your fields in desplay.
I hope this information is much helpful.
Thanks & Regards,
Vaibhav Pendse.