2009 Apr 18 1:52 PM
Hi all,
I have used BDC inside user exit.I am getting an error while activating the user exit .
The error is before the statement 'FORM' the structure included by 'FUNCTION' must be ended by 'ENDFUNCTION'.(Not getting what 'FUNCTION' is mentioned in error message)
CALL TRANSACTION 'MM02' USING bdcdata MODE v_mode UPDATE 'S'
MESSAGES INTO it_bdcmsg1.
ENDLOOP.
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
----
Insert field *
----
FORM bdc_field USING fnam fval.
IF fval <> nodata.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
2009 Apr 18 2:32 PM
Hi,
This is beacuse you are trying to nest the processing block, more strictly procedures. This is not possible in ABAP.
"Your customer exit simply lies between these statements introducing procedure (funtion module)
FUNCTION....
INCLUDE some_customer_exit_here.
ENDFUNCTION
You can't put any new procedure nor processing block inside this FUNCTION....ENDFUNCTION block.
Instead you have two possibilities:
- check function group of that function module, usually starts with X... for customer exists, add and include inside it, following SAP standard naming conventions for subroutines. It must be like inlcude ...F01 . Go inside there and create your subroutine (forms) here. Now in your cutomer exit simply use that form by calling it.
- create another program of type S (subroutine pool) and place your forms here. Now call it from customer include using PERFORM YOUR_NEW_PROGRAM_NAME(subroutine_name).
Regards
Marcin
Hi all,
I have used BDC inside user exit.I am getting an error while activating the user exit .
The error is before the statement 'FORM' the structure included by 'FUNCTION' must be ended by 'ENDFUNCTION'.(Not getting what 'FUNCTION' is mentioned in error message)
CALL TRANSACTION 'MM02' USING bdcdata MODE v_mode UPDATE 'S'
MESSAGES INTO it_bdcmsg1.
ENDLOOP.
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
----
Insert field *
----
FORM bdc_field USING fnam fval.
IF fval <> nodata.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
2009 Apr 18 2:32 PM
Hi,
This is beacuse you are trying to nest the processing block, more strictly procedures. This is not possible in ABAP.
"Your customer exit simply lies between these statements introducing procedure (funtion module)
FUNCTION....
INCLUDE some_customer_exit_here.
ENDFUNCTION
You can't put any new procedure nor processing block inside this FUNCTION....ENDFUNCTION block.
Instead you have two possibilities:
- check function group of that function module, usually starts with X... for customer exists, add and include inside it, following SAP standard naming conventions for subroutines. It must be like inlcude ...F01 . Go inside there and create your subroutine (forms) here. Now in your cutomer exit simply use that form by calling it.
- create another program of type S (subroutine pool) and place your forms here. Now call it from customer include using PERFORM YOUR_NEW_PROGRAM_NAME(subroutine_name).
Regards
Marcin
2009 Apr 18 3:23 PM
The reason for this error is your form endform.
In case of exits you are not allowed to write form endform directly, instead you can create a function module or an include which contains the form and use it.
when the system encounters sequencially the form statement it is unable to interpret.
Regards,
Lalit Mohan Gupta.
2009 Apr 18 3:49 PM
Hi Sanu,
If possible use a BAPI to solve your requirement or create a Function module for the logic and call it inside the exit.
Regards,.
Kumaar.S
2009 Apr 18 5:06 PM
hi write ur bdc in a report and call the report that means submit report .
for this u have to export values from user exit and import in report.
2009 Apr 18 5:09 PM
other wise put ur values in selection screen with no display ,and submit ur report by giving the values.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |