Skip to Content
author's profile photo Former Member
Former Member

Concatenate

Hi,

This is my code.

DO VA_J_2CFAKT TIMES.

IF VI_IDX = 1.

CONCATENATE SCR_DRUM SCR_DRNO SCR_WGT INTO VA_DRUMNO SEPARATED BY

SPACE.

TB_DRUM_NO-J_2CTRNR = VA_DRUMNO.

TB_DRUM_NO-CHARG = SCR_DRNO.

APPEND TB_DRUM_NO.

CLEAR TB_DRUM_NO.

ELSE.

SCR_DRNO = SCR_DRNO + 1.

CONCATENATE SCR_DRUM SCR_DRNO SCR_WGT INTO VA_DRUMNO SEPARATED BY

SPACE.

IF SY-SUBRC EQ 0.

TB_DRUM_NO-J_2CTRNR = VA_DRUMNO.

TB_DRUM_NO-CHARG = SCR_DRNO.

APPEND TB_DRUM_NO.

CLEAR TB_DRUM_NO.

ENDIF.

ENDIF.

VI_IDX = VI_IDX + 1.

CLEAR VA_DRUMNO.

ENDDO.

the concatenate statement is working for the first iteration,but not working for rest of the iterations.

Could someone help me with this please.

Thanks,

Supriya Manik.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 28, 2007 at 02:27 PM

    1. check the value of VA_J_2CFAKT

    2. First time as VI_IDX = 1 it will goto IF condition

    3. Next time as VI_IDX is not equal to 1 it will goto ELSE condition where it will execute the concatenate.

    where you are getting the problem , debug and check

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 28, 2007 at 02:30 PM

    for the second iteration is is ignoring SCR_DRNO SCR_WGT ,and only getting SCR_DRUM into VA_DRUMNO.

    SY-SUBRC = 4.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 28, 2007 at 02:30 PM

    Hi,

    Your code is fine ...

    DO VA_J_2CFAKT TIMES. " Check value for VA_J_2CFAKT. if this is 1 then it will execute only once.

    Regards

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.