‎2007 Dec 14 10:40 AM
Hi all
i have a transaction MD4C which shows some missing material numbers .
now i ill have to create a report which shows some selected part of data from MD4C.
means if md4c is showing 16 rows i ill have to show only 5 rows based on my selection criteria.
Please guide me how to do it .
wat i am thinking
can i use statement submit to execute that program and i want to
ask 1 thing
like in MD4C i have an internal table in which i have all the data
can i use submit statement to bring that internal table to my program .
plz guide me how to do it ..
Thanx in advance .
‎2007 Dec 14 11:18 AM
hi,
if you have alll the data, why don't you analyze the logic of that transaction code with the help of functional consultant and write u r own code.
internal tables are local to their parent programs, u can't bring data out
regards,
pavan
‎2007 Dec 14 11:33 AM
Hi,
first find and analyse the report program executing while executing the Tcode MD4C.
you can directly call that standard report program from your z-program using below statement.
Follow the below steps.
Call the below FM to prepare selection table
W_REPORTID = SY-REPID.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = W_REPORTID
TABLES
SELECTION_TABLE = W_SEL_TAB.
Call the standard program
SUBMIT 'Standard program name' EXPORTING LIST TO MEMORY WITH SELECTION-TABLE W_SEL_TAB AND RETURN.
use the below function module to get the contents from memory
Use the function module to get the data from memory.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = I_LIST.
then use the below function module to convert the downloaded data
Use the function module to convert raw data to asci format
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
LISTASCI = I_INITIAL
LISTOBJECT = I_LIST
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.
IF SY-SUBRC NE '0'. "#EC *
MESSAGE E056."Unable to convert data.
ENDIF.
now I_INITIAL will contains the standard report data; now you can analyse this internal table and you can do the coding towards your requirement.
Reward if useful.
Thanks,
Sreeram.
‎2007 Dec 14 11:57 AM
Hi sreeram
this is looking gud
once i ill check it then i ill surely reward u
do u hav any example 4 this if ye plz giv me complete code 4 it
thanks
‎2007 Dec 14 11:40 AM
hi,
u say u already know the table which stores the data for tis tcode. get the data in the z program. store it in internal table and put one
PARAMETERS:.... (this will accept teh no of lines u want to get or disp)
then in prog code, loop at tat int table which stores all ur data, loop on it until sy-tabix eq parameters value.
in tis way only specified lines will be displayed....
‎2007 Dec 14 11:58 AM
hi sabahuddin
thanx 4 d rply
but plz tell me how to bring data in my z program .
thanx