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

INSERTING FEW VALUES IN TO AN INTERNAL TABLE WHICH HAS 1 ROW

Hi Abap Guru's

iam reading from an internal table IT_ACTUAL INTO WA_ACTUAL.

AFTER READING INTO WA_ACTUAL I GET OUTPUT AS

FOLLOWS.

READ TABLE IT_ACTUAL INTO WA_ACTUAL INDEX 1.

In work area we get

Pernr 01000001

Infty 0008

Subty 0

Endda 99991231

Begda 19830301

Seqnr 000

LGA01 1BAS

BET01 4635.00

LGA02 1HRA

BET02 2317.00

LGA03 1COA

BET03 772.00

LGA04 1WAA

BET04 150.00

LGA05 1TRM

BET05 1850.00

MY REQUIRED OUTPUT IS AS FOLLOWS.

I should get output as follows

Pernr 01000001

Infty 0008

Subty 0

Endda 99991231

Begda 19830301

Seqnr 000

LGA01 1BAS

BET01 4635.00

LGA02 1HRA

BET02 2317.00

LGA03 1COA

BET03 772.00

LGA04 1ATB

BET04 200.00

LGA05 1WAA

BET05 150.00

LGA06 1TRM

BET06 1850.00

I need to insert into lga04 value as 1ATB and bet04 value as 200.

And the rest should come down.

Thank for your help

-Anil

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 29, 2008 at 07:48 AM

    loop at IT_ACTUAL INTO WA_ACTUAL.

    wa_actual-lga04 = '1ATB'.

    wa_actual-bet04 = 200.

    modify it_actual from wa_actual transporting lga04 bet04.

    endloop.

    Regards,

    Amit

    Reward all helpful replies.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 07:50 AM

    Hi,

    Check the below logic:

    READ TABLE IT_ACTUAL INDEX 1.

    IT_actual-LGA04 = '1ATB'.

    IT_actual-BET04 = '200.00'.

    MODIFY it_actual INDEX 1 TRANSPORTING LGA04 BET04.

    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.