Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

dynamic program help

Hi all.....

i got this dynamic program to insert to the database. however it only grab the first value and insert. All my remain value is not insert to the database.

here is my program.

REPORT ZGARY_MASTER1.

do 5 times.

icounter = icounter + 1.

APPEND 'REPORT ZGARY_ZDYN3.' TO CODE.

APPEND 'tables ZTABLE.' to code.

APPEND 'data icounter(3) type n.' to code.

APPEND 'START-OF-SELECTION.' TO CODE.

CONCATENATE 'ZTABLE-ADMINO = ''' icounter into value.

CONCATENATE value '''.' into value.

APPEND value TO CODE.

APPEND 'INSERT INTO ZTABLE VALUES ZTABLE.' to code.

INSERT REPORT 'ZGARY_ZDYN3' FROM CODE.

SUBMIT ZGARY_ZDYN3 and RETURN.

clear code.

enddo.

any great help?

Tags:
Former Member
replied

Hi gary,

After Insert , if you want to generate a report , try this:

INSERT REPORT lv_reportname FROM code.

GENERATE REPORT lv_reportname.

COMMIT WORK AND WAIT.

Rgds,

Sandeep

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question