06-18-2015 2:53 PM
06-18-2015 3:03 PM
Go to t-code SE18, give the BADI name and display. In the next screen Implementation->Create.
Regards,
Raju
06-18-2015 3:18 PM
06-18-2015 3:24 PM
06-18-2015 3:34 PM
Hi,
Badi ACC_DOCUMENT has two methods CHANGE and FILL_ACCIT.
Once you created your implementation you can see the scope of importing and changing parameters(structures) in each methods.
You can use importing parameters and change the values of changing parameters.
Thanks,
Sagar
06-18-2015 3:38 PM
Thanks for Reply.
I want to Importing Parameters.Using .Net sap connector
Any Example
06-18-2015 3:48 PM
Hi
It doesn't make a sense to call a BADI from another system, a BADI is an exit and it can't stand alone, it has to be called by the program in which it appears
ACC_DOCUMENT is called by BAPIs BAPI_ACC_DOCUMENT_POST/BAPI_ACC_DOCUMENT_CHECK
And you should consider you can see the RFC in SAP Connector, so I don't believe you can call it, of course you can call the BAPI BAPI_ACC_DOCUMENT_POST or BAPI_ACC_DOCUMENT_CHECK, and they'll call the BADI ACC_DOCUMENT
So what do you really need to do?
Max
06-18-2015 4:01 PM
Thanks Max.
I call BADI ACC_DOCUMENT in BAPI BAPI_ACC_DOCUMENT_POST.
How to execute badi in bapi.give solution using RFC in SAP.
06-18-2015 4:05 PM
Hi
but you don't need to call the BADI, it'll be called automatically by BAPI_ACC_DOCUMENT_POST.
The BAPI is a RFC so you need to call it, not the BADI
I can't understand why you want to call the BADI
Max
06-18-2015 4:10 PM
Max
I want To pass Parameter In Extensions table. for extra parameter.
I want to pass Posting Key.
06-18-2015 4:22 PM
06-18-2015 4:40 PM
Ok
but you can do it only in SAP, you need to create an implementation in SAP (not out of SAP)
The structure of extensions is based on BAPIPAREX:
So in your C program you need only to fill the extensions and transfer them to BAPI
You can use the field STRUCTURE in order to create a control in the BADI (the BAPI can be called by several programs)
You need to transfer the item number (so ITEMNO_ACC) and the posting key in the rest of extensios;
EXTENSION2-SRTUCTURE = '.............'.
* The posting key for the first position could be
EXTENSION2+30(10) = '0000000001'.
EXTENSION2+40(2) = '24'.
APPEND EXTENSION2.
* The posting key for the second position could be
EXTENSION2+30(10) = '0000000002'.
EXTENSION2+40(2) = '34'.
APPEND EXTENSION2.
In this way you can fill the extensions (of course you need to write the code above based on the language used for SAP Connector)
So in SAP you need to create an implementation of the BADI in order to transfer the data from extensions to internal structure, something like this:
DATA: L_EXTENSION TYPE BAPIPAREX.
DATA: L_ACCIT TYPE ACCIT.
LOOP AT C_EXTENSION2 INTO L_EXTENSION.
"Here you make sure the BAPI is called by your program
CHECK L_EXTENSION-STRUCTURE = '........'.
LOOP AT C_ACCIT INTO L_ACCIT
WHERE POSNR = L_EXTENSION+30(10). "Get the item
L_ACCIT-BSCHL = L_EXTENSION+40(2). "Transfer the posting key
MODIFY C_ACCIT FROM L_ACCIT.
ENDLOOP.
ENDLOOP.
You need to use the method CHANGE of BADI ACC_DOCUMENT
Max