‎2009 Apr 16 12:59 PM
Hi SDN,
i had new requirment where i need to create a new BAPI which will work same as READ_TEXT function module.
because they use this BAPI in third party system.
please suggest me how can i start.
and can any one tell how we can convert a Function Module to a BAPI.
Thanks & regards
Naresh
‎2009 Apr 16 1:15 PM
Dear
Function module can be converted into BAPI .
But they ase not similar .
a) First you have to check remote enable tab initially .
b) secondally you have to use the import export paramter as pass by value .
and then finally u have use to create by using swo1 trancation
rgds ankit
‎2009 Apr 16 1:15 PM
Dear
Function module can be converted into BAPI .
But they ase not similar .
a) First you have to check remote enable tab initially .
b) secondally you have to use the import export paramter as pass by value .
and then finally u have use to create by using swo1 trancation
rgds ankit
‎2009 Apr 16 1:22 PM
Hi,
Copy the code of read_text as zread_text
and change the attributes tab click on radio button 'Remote enablled module'
all the parameters in import and export are 'PASS BY VALUE' so there is no nedd to change those
after save check and activate
and create a business object in SWO1 transaction for this module
and then this can be used in remote systems
regards
Krishna
‎2009 Apr 16 2:11 PM
for SWO1 the function module should be API method so ZREAD_TEXT won't be a API method.
again we need to create a BAPI for the same.
so please let me know
‎2009 Apr 16 2:37 PM
check some online document to create a BAPI and at the end of the steps there is a step called register as an API, once you do that that can be used as a BAPI.
The code insde would be just a select statement from STXH table and get the lines and convert to output..
[BAPI Step by step Guidance|http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm]
‎2009 Apr 16 2:30 PM
Hi Naresh,
After creating ZREAD_TEXT with the following steps:
ZREAD_TEXT shud be assigned to a package with request.
1) ZREAD_TEXT should be remote enabled
2) marking the parameters pass by value
4) Add the parameter RETURN LIKE BAPIRET2 in the tables tab.
3) Copy the code from the function module READ_TEXT .
4) Activate the function module
5) In the change mode , in the atttibutes tab and and release it ( Function module->Release -> Release )
Now go to SWO1 and create an object.
Create a method in the methods by going to Utilities->API Methods->API Methood.
Give the FM name ZREAD_TEXT , and keep on clicking the NEXT button(>).
It will disply the message method inserted.Keep the cursor on method.
Save it and Go to Edit->Change release status->1)object type-> to modelled
2) to implemented
3) to released
and then Go to Edit->Change release status->1)object type component-> to modelled
2) to implemented
3) to released.
The created object type will be followed by tick mark.
Then Generate the created object by clicking the ball shaped icon.
U can check it that the BAPI has been created in BAPI transaction.
Thanks and Regards,
Krishna Chaitanya G
‎2009 Apr 16 2:54 PM
‎2009 Apr 16 5:21 PM
hey naresh..let me know if it doesnt work
Thanks and Regards,
Krishna Chaitanya G
‎2009 Apr 16 3:55 PM
Copy the function module Read_text.
from se37 and change the properties.
Check for remote enabled.
Use like instead of type.
Return table of type bapiret2 for error message.
Regards,
Lalit Mohan Gupta.
‎2009 May 15 12:24 PM