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

Function module

Anybody how know why my program does not work?

REPORT Z_TEST_FUNKTIONSMODUL .

DATA wa_order TYPE VBAK. "orderheader

DATA it_order TYPE VPKVBAKTTYP. "create intern table from table type

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2005 at 09:27 AM

    Hi Linn,

    Do you have any data inside wa_order?

    Regards,

    Ville

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 03, 2005 at 09:32 AM

    wa_order should be of type /SAPNEA/MR3_ORDER_HEADER

    it_order should be of type /SAPNEA/MR3_ORDER_ITEM

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2005 at 09:33 AM

    Linn,

    Sounds like the function module will get the Order details if you pass the right values to the parameter wa_order.

    However, in the code you have given, you are not passing in any values in wa_order so its not going to return any values.

    Please fill the variable wa_order with the order no. etc and it should give you the details in the table it_order.

    Regards,

    Ravi

    Note : please reward points if this helpful.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for helping me. Do you mean something like this?

      PARAMETERS pa_order TYPE I. “table fiels

      DATA it_order TYPE VPKVBAKTTYP. "create intern table from table type

      CALL FUNCTION '/SAPNEA/SMAPI_ORDER_GETDETAIL'

      EXPORTING

      PI_ORDER_HEADER = pa_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.

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2005 at 09:37 AM

    If you have an order number with you, you can try something like this.

    Select * from vbak into corresponding fields of wa_order where vbeln = (order number).

    Now pass the wa_order to the function module.

    Regards,

    Ravi

    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.