07-09-2007 5:21 PM
hi,
i am giving the requirement,please help me in solving the issue.
Requirement.
i am having a functionmodule.we have to give the sales document as the input to the function module.
we have to call a report in which selection screen contains a parameter where we have to give the input as the sales document from the function module.
Please provide with me the required solution for this.
it is very urgent.....................
thanks in advance.
07-10-2007 6:22 AM
hI ...
Here is the Function Module for sales ducoment display based on the sales document number as input to the function module ..
just go to se37 in import give
R_VBELN TYPE VBAK-VBELN and in the source code as below lines ...
FUNCTION ZTEST_SALE.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(R_VBELN) TYPE VBAK-VBELN
*"----------------------------------------------------------------------
SET PARAMETER ID 'BES' FIELD R_VBELN .
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN .
ENDFUNCTION.
<b>the same quesry as report line </b>
report zasra.
parameter : R_VBELN like VBAK-VBELN.
SET PARAMETER ID 'BES' FIELD R_VBELN .
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN .
reward points if it is usefull ...
Girish
07-09-2007 5:24 PM
Hi
If your fm has a table parameter in order to transfer the sales documents, in your fm:
RANGES: R_VBELN FOR VBAK-VBELN.
REFRESH R_VBELN.
LOOP AT T_SALES_DOC.
R_VBELN(3) = 'IEQ'.
R_VBELN-LOW = T_SALES_DOC-VBELN.
APPEND R_VBELN.
ENDLOOP.
IF SY-SUBRC = 0.
SUBMIT <REPORT> WITH SO_VBELN IN R_VBELN AND RETURN.
ENDIF.
Max
07-10-2007 6:22 AM
hI ...
Here is the Function Module for sales ducoment display based on the sales document number as input to the function module ..
just go to se37 in import give
R_VBELN TYPE VBAK-VBELN and in the source code as below lines ...
FUNCTION ZTEST_SALE.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(R_VBELN) TYPE VBAK-VBELN
*"----------------------------------------------------------------------
SET PARAMETER ID 'BES' FIELD R_VBELN .
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN .
ENDFUNCTION.
<b>the same quesry as report line </b>
report zasra.
parameter : R_VBELN like VBAK-VBELN.
SET PARAMETER ID 'BES' FIELD R_VBELN .
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN .
reward points if it is usefull ...
Girish