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

Modify stmt leads dump (urgent)

PERFORM get_customer TABLES itab_futureorders.

FORM get_customer TABLES p_itab STRUCTURE itab_orders .

DATA: wa_itab LIKE LINE OF itab_orders.

SELECT avbeln aparvw

b~name1

INTO TABLE itab_customer

FROM vbpa AS a

INNER JOIN kna1 AS b ON akunnr = bkunnr

FOR ALL ENTRIES IN p_itab

WHERE vbeln EQ p_itab-soord

AND parvw EQ 'ZE'.

IF sy-subrc EQ 0.

LOOP AT itab_customer INTO wa_customer.

READ TABLE p_itab INTO wa_itab

WITH KEY soord = wa_customer-vbeln.

IF sy-subrc EQ 0.

CLEAR p_itab-name1.

p_itab-name1 = wa_customer-name1.

ELSE.

CLEAR p_itab-name1.

ENDIF.

MODIFY p_itab.

ENDLOOP.

ENDIF.

ENDFORM. " get_customer

I am getting short dump while exec the modify statement. Please let me know the error in this.

Regards,

Cheritha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2008 at 12:18 PM

    Hi,

    AFter modif write like this...

    MODIFY p_itab INDEX idx (Data : idx TYPE sy-tabix.)

    Regards

    Rams

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2008 at 12:08 PM

    Hi,

    Check out the errors.

    PERFORM get_customer TABLES itab_futureorders.

    FORM get_customer TABLES p_itab STRUCTURE itab_orders .

    DATA: wa_itab LIKE LINE OF itab_orders.

    SELECT avbeln aparvw

    b~name1

    INTO TABLE itab_customer

    FROM vbpa AS a

    INNER JOIN kna1 AS b ON akunnr = bkunnr

    FOR ALL ENTRIES IN p_itab

    WHERE vbeln EQ p_itab-soord

    AND parvw EQ 'ZE'.

    IF sy-subrc EQ 0.

    LOOP AT itab_customer INTO wa_customer.

    READ TABLE p_itab INTO wa_itab

    WITH KEY soord = wa_customer-vbeln.

    IF sy-subrc EQ 0.

    CLEAR p_itab-name1.

    • " commentedp_itab-name1 = wa_customer-name1.

    wa_itab-name1 = wa_customer-name1.

    ELSE.

    CLEAR wa_itab-name1.

    ENDIF.

    MODIFY p_itab from wa_itab..

    ENDLOOP.

    ENDIF.

    ENDFORM. " get_customer

    or u can use this logic.

    data: lv_ind type i.

    loop at p_itab into wa_itab.

    lv_ind = sy-tabix.

    read table itab_customer into wa_customer

    with key vbeln = wa_itab-soord.

    if sy-subrc = 0.

    wa_itab-name1 = wa_customer-name1.

    modify p_itab from wa_itab index lv_ind

    transporting name1.

    endif.

    clear wa_itab.

    ENDLOOP.

    regards,

    Santosh Thorat

    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.