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

Function module

Any idea why it does not work?

REPORT Z_TEST_FUNKTIONSMODUL.

DATA: it_order TYPE STANDARD TABLE OF /SAPNEA/MR3_ORDER_ITEM.

DATA: wa_order TYPE /SAPNEA/MR3_ORDER_HEADER.

wa_order-SALESDOCUMENT = '0005100000'.

*Break-point.

CALL FUNCTION '/SAPNEA/SMAPI_ORDER_GETDETAIL'

EXPORTING

PI_ORDER_HEADER = wa_order

  • PI_PARVW =

  • PI_PRICE_CONDITION1 = 'PR00'

  • PI_PRICE_CONDITION2 =

  • PI_PRICE_CONDITION3 =

  • PI_TAX_CONDITION =

  • PI_UNIT_SPLIT = 50

  • PI_TEXT_ID = '0001'

  • PI_LANGUAGE = SY-LANGU

  • IMPORTING

  • PO_ORDER_HEADER =

  • RETURN =

TABLES

POT_ORDER_ITEM = it_order.

Data: wa_result LIKE LINE OF it_order.

LOOP AT it_order INTO wa_result.

WRITE: test-POSNR_VA

ENDLOOP.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2005 at 01:18 PM

    hi,

    execute in SE37 - > /SAPNEA/SMAPI_ORDER_GETDETAIL

    with this sales order numebr ('0005100000').

    by the way you can find out whether able to get result or not

    cheers,

    sasi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2005 at 01:20 PM

    Where is "test-posnr_va" declared in this code? I do not see it.

    I see this reference in a LOOP stmnt, but no declaration of it.

    LOOP AT it_order INTO wa_result.

    WRITE: test-POSNR_VA

    ENDLOOP

    Message was edited by: John Jakabcsin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2005 at 01:26 PM

    Hi Linn

    I try to run this FM in my system and it works fine, so I think you run the FM well, check the order 51000000: does it exist?

    Run it in debug by SE37: look at the point where fm reads VBAK.

    Max

    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.