1

I have to pass data to BAdI acc_document in parameter extension1 of BAPI bapi_acc_document_post, but I don't know how to do that using SAP .NET connector.

Any suggestions?

Regards, Devinder

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Devinder Yadav
  • 124
  • 2
  • 9
  • Read the [programming guide](http://logosworld.com/docs/SAP/Connector/SAP%20Connector%20for%20Microsoft%20.NET%20%20NCo_30_ProgrammingGuide.pdf). – Fixation Jun 10 '15 at 09:43
  • I have developed gr, po,invoice and service invoice getting and posting data to sap but in some cases we need to execute a badi to update some value in a table that are not updated through bapi. I have created a structure of badi but then I have to pass it as a parameter to extension1. I don't know how to do it – Devinder Yadav Jun 10 '15 at 11:40

1 Answers1

0

BAPI extension parameters are pretty much free-form - as you can see, for BAPI_ACC_DOCUMENT_POST parameters EXTENSION1 and EXTENSION2 are defined as tables with character fields.

You can store whatever data you want to into them and use them as you do any other BAPI parameters, the key is that you need to interpret the values in your enhancement. For example, if the caller stores an external document number into a row of EXTENSION1, just interpret it as a document number when you use it in your BADI. If you're passing a structure in the extension parameter it can be a little trickier (as you have multiple fields to deal with), but the same principle applies.

mjturner
  • 1,035
  • 7
  • 16