‎2011 Jan 06 12:58 PM
Dear All,
I am trying to create bapi in swo1 , I am getting error given below when am giving function module name in Utilities->API .
Data type: ZBAPI_BUKRS cannot be used for methods.
Here zbapi_bukrs is data element which is given in import parameter of function module and one more thing when am giving standard data element name bukrs then also same error is coming.
Thanks,
rsandhosh
Moderator message: please use more descriptive subject lines for your posts.
Edited by: Thomas Zloch on Jan 6, 2011 2:39 PM
‎2011 Jan 06 2:46 PM
Every parameter of a BAPI must belong to a <namespace>BAPI<name> structure, so don't use a TYPE ZBAPIelement but refer to a ZBAPIstructure-fieldname element. Create ZBAPI structure for structure (parameter and table) and another structure for single parameter definition.
Check [Actions in the ABAP Dictionary |http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/43/b46c3953c111d395fa00a0c94260a5/frameset.htm] in [BAPI Programming Guide (CA-BFA)|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm]
Look at SAP standard BAPI to get a better idea.
*" IMPORTING
*" VALUE(PARAMETER1) LIKE ZBAPISTRUCTURE1-FIELD1
*" VALUE(STRUCTURE1) LIKE ZBAPISTRUCTURE2Raymond
‎2011 Jan 06 2:46 PM
Every parameter of a BAPI must belong to a <namespace>BAPI<name> structure, so don't use a TYPE ZBAPIelement but refer to a ZBAPIstructure-fieldname element. Create ZBAPI structure for structure (parameter and table) and another structure for single parameter definition.
Check [Actions in the ABAP Dictionary |http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/43/b46c3953c111d395fa00a0c94260a5/frameset.htm] in [BAPI Programming Guide (CA-BFA)|http://help.sap.com/saphelp_NW70EHP1core/helpdata/en/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm]
Look at SAP standard BAPI to get a better idea.
*" IMPORTING
*" VALUE(PARAMETER1) LIKE ZBAPISTRUCTURE1-FIELD1
*" VALUE(STRUCTURE1) LIKE ZBAPISTRUCTURE2Raymond