Application Development and Automation 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: 
Read only

ABAP Code Endmethod missing error??

Former Member
0 Likes
1,179

Hi Friends,Please help me. I am not having logsys/source system id field in source datasource , hence i trying to populate that in BI . I have wriiten the code in start routine which give me <b>ENDMETHOD MISSING error</b>, as below.

please tell what i am missing to eliminate the error <b>endmethod</b>

FORM STARTROUTINE.

USING G_S_MINFO TYPE RSSM_S_MINFO

CHANGING DATAPAK type TAB_TRANSTRU

G_T_ERRORLOG TYPE rssm_t_errorlog_int

ABORT LIKE SY-SUBRC.

RESULT = G_S_MINFO-LOGSYS.

or

LOOP AT DATAPAK INTO l_s_datapak_line.

l_s_datapak_line-zzsourcsys = G_S_MINFO-LOGSYS.

MODIFY DATAPAK FROM l_s_datapak_line.

ENDLOOP.

ENDMETHOD.

ENDCLASS.

Poonam Roy

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
580

So is this a FORM or a method. You open with FORM, but close with END METHOD and END CLASS.

If it is a FORM, then end with an ENDFORM. If it is a method, then you must begin with a METHOD statement.

Regards,

RIch Heilman

Read only

Former Member
0 Likes
580

Use this....

FORM STARTROUTINE

USING G_S_MINFO TYPE RSSM_S_MINFO

CHANGING DATAPAK type TAB_TRANSTRU

G_T_ERRORLOG TYPE rssm_t_errorlog_int

ABORT LIKE SY-SUBRC.

RESULT = G_S_MINFO-LOGSYS.

LOOP AT DATAPAK INTO l_s_datapak_line.

l_s_datapak_line-zzsourcsys = G_S_MINFO-LOGSYS.

MODIFY DATAPAK FROM l_s_datapak_line.

ENDLOOP.

ENDFORM.

Reward if helpful...