How to override Report column values of previous columns with next column values based on PO values?

sunilj

Member
How to override Report column values of previous columns with next column values based on PO values?

Dear All,

I need help in below development issue;

How to override Report column values of previous columns with next column values based on PO values?

I want to develop a report based on F0901/F0902 where user requirement is to print all Amount columns of F0902 i.e. AN01,AN02....AN12. User will provide month range from PO i.e. From Month & To Month. Lets say user is providing month from = 1 & to = 12, F0902.FY = 12 with data selection F0902.OBJ >= 500000. Now report should bring data from F0902 as AN01,AN02,....AN12.
In report design Columns are fixed for AN01,AN02...AN12. If a report is run for month from 3 - to - 10 so column of 3 should shift to 1st meaning AN01 which is now printing blank should gets replaced by AN03, AN02 should get replaced by AN004 and so on & AN08 should get replaced by AN10.

Can you guys provide me any help on this, meaning report section type, report type?

--
Sunil
 
Re: How to override Report column values of previous columns with next column values based on PO values?

1) Define a string variable say VA evt_szColHeading_LDTX

2) Have a While Loop which will go through each month based on the processing option. That is another numeric variable will be incremented for every month within the From and To Month values.

3) Within the While loop after the numeric variable has been incremented, call business function B8000094 (Convert Math_Numeric to String) to convert the numeric variable to string into another string variable say VA evt_szString_PV01.

4) Assign a new value to the first string variable.
For eg.,
VA evt_szColHeading_LDTX = concat('AN',ltrim(rtrim(VA evt_szString_PV01," ")," "))

5) The LDTX variable will now become ANxx wherein xx stands for the period. For e.g., "AN06".

6) Lastly, set the column heading by,

Set Grid_ColumnHeading(FC Grid, AN01, VA evt_szColHeading_LDTX)

This code could be added to the Do section of the Report Header Section.

------------
The one thing I forgot to mention is in order to column heading number preceded by zeros, you will need to LPAD the PV01 variable with Zero.
VA evt_szString_PV01 = LPAD(ltrim(rtrim(VA evt_szString_PV01," ")," "),"0",2)
 
Back
Top