Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

experts guide me standard program

former_member97974
Participant
0 Kudos
198

Hi all

i have a transaction MD4C which shows some missing material numbers .

i want to bring all the data displayed by this transaction in an internal table in a z program .

plz guide me how to do it .

thanx in advance

5 REPLIES 5

former_member223537
Active Contributor
0 Kudos
130

Hi,

Create a Z program & use SUBMIT SAPMM61O to SAP-SPOOL.

Read the spool using RSPO_RETURN_ABAP_SPOOLJOB. This will provide the spool data into internal table.

Best regards,

Prashant

Former Member
0 Kudos
130

Hi,

Have a look @the following code.

data: Begin of data occurs 0.

include structure abaplist.

data: End of data.

data listtab like abaplist occurs 1.

data: begin of ascitab occurs 1,

line(1024),

end of ascitab.

*

SUBMIT RSM04000_ALV EXPORTING LIST TO MEMORY AND RETURN.

*

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = data

  • EXCEPTIONS

  • NOT_FOUND = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'LIST_TO_ASCI'

  • EXPORTING

  • LIST_INDEX = -1

  • WITH_LINE_BREAK = ' '

TABLES

listasci = ascitab

LISTOBJECT = data

  • EXCEPTIONS

  • EMPTY_LIST = 1

  • LIST_INDEX_INVALID = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Put debugger & have a look @ascitab.

I hope this helps,

Regards

Raju Chitale

0 Kudos
130

How did you solve your problem

0 Kudos
130

How did you solve your problem

0 Kudos
130

How did you solve your problem