Skip to Content
author's profile photo
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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • author's profile photo
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    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 comment
    10|10000 characters needed characters exceeded