Creation of custom BAPI for FB02
Hi Guys,
I want to create custom BAPI to update FB02 and for my requirement i found there is no standard BAPI available since i need to update lot of other fields in FB02 that is the reason, i want to use CALL TRANSACTION inside the BAPI to update FB02 but i found its not working.
Is it really possible to use BDC( Call Transaction ) inside the BAPI??? if it is possible any reason why its not working for me and if it dont work, how do u think i should update FB02 - plss dont mention standard BAPI's or FM.
Note: I have seen some Standard BAPI's using CALL Transaction inside them but in my case its not working.
Thanks & Regards,
Pavan
Your question is to create custom BAPI
Follow these steps.
1. Find the fields you are giving values on the screen and create a structure. you should only use structure and must not use that structure in other ways.If you use it in other objects BAPI will be frozen.
2.After you create Structure you create function module and mention that structure in that.Later release the function module
3.Later you go to SWO1 and add that method in that and realese that also
4.Finally you can find your BAPI in BOR
You can also find solution to your question in the following link
http://www.****************/Tutorials/BAPI/CustomBAPICreation/page1.htm
Similar Messages
-
How to create custom BAPI for a project on Agentry?
As I am very new to BAPI creation, I would like to get some helpful pdf documents or links for creating custom BAPIs, which would fetch data for an Agentry Project to be build.
Tags edited by: Michael ApplebyRajkamal,
I would recommend you work through the following tutorial on how to build an Agentry application from scratch. It covers creating a BAPI to retrieve data from the SAP backend to Agentry.
Part 1 - http://scn.sap.com/docs/DOC-47550
Part 2 - http://scn.sap.com/docs/DOC-47651
--Bill -
Standard or Customizing Bapi for T-code F-44
Hi
I need to clear vendor open invoices using BAPI's for T-code F-44 .I've got through various FM like <b>bapi_acc_document_post</b> and <b>bapi_ar_acc_getbalanceditems</b> but could'nt find solution because this FM's are for customer clearing the open items from table BSAD(cleared accounts of customer).Have any boby worked on this tcode to clear vendor accounts using bapi's or do we have any standard FM to use the scenario same as FM mentioned above for table BSAK(vendor clear items).
Its really simple working with bdc's to transfer data from flat file to the above transaction.But as known every vendor has huge sets of items and this could be a huge performance issue....so to avoid this in future we need to work on this using exclusively BAPI's......Any suggestions or sample codes wud surely be appreciated....
Thanks in Advance......hi,
look here
Re: BAPI for transaction F-03
<b>Reward points</b>
Regards -
I need to run an annual process that searches on BSIS, BSID and BSIK tbls, comparing it with table WITH_ITEM. If field WITH_ITEM-WT_WITHCD is equal to Space must place ` 02' and place the value in fields WITH_ITEM-WT_QSSHH and WITH_ITEM- WT_QSSHB.
I've found that this modification can be done doing a batch input on FB02 tcode, but the error risk is high, if they change the conditions of the accounts, in addition is very slow. I'm Looking for a BAPI for the FB02 and i've found nothing about it. There is a function but this single one updates fields of BSEG and BKPF.
Is There a Function or a program With wich it can Work ?.
Regards,
Steve.I need to run an annual process that searches on BSIS, BSID and BSIK tbls, comparing it with table WITH_ITEM. If field WITH_ITEM-WT_WITHCD is equal to Space must place ` 02' and place the value in fields WITH_ITEM-WT_QSSHH and WITH_ITEM- WT_QSSHB.
I've found that this modification can be done doing a batch input on FB02 tcode, but the error risk is high, if they change the conditions of the accounts, in addition is very slow. I'm Looking for a BAPI for the FB02 and i've found nothing about it. There is a function but this single one updates fields of BSEG and BKPF.
Is There a Function or a program With wich it can Work ?.
Regards,
Steve. -
How to update the Return table while creating a custom bapi.
Hi,
1st Check for the return value ( Sy-subrc). You can check as shown below
* select plant and its description
select werks from t001w into t_plant where werks = t_werks.
IF sy-subrc <> 0.
* if the details is not found pass return value
CALL FUNCTION 'BALW_BAPIRETURN_GET2'
EXPORTING
type = 'S'
cl = 'ZMSG'
number = '001'
IMPORTING
return = return.
APPEND return.
ENDIF.
Goto TCode- SE91 & create own msg class (here ZMSG) & populate.
Regards.
Nikhil. -
Creation of custom Transaction for confirm goods in SRM
Hi Experts
i need to create a custom transaction same as standard one for confirm goods/servics in SRM portal.
In sap GUI, the transaction is BBPCF03
Can you please suggest any good sources where i can learn to Custome Tcodes for my requirement
Thanks in advance
Edited by: kittu reddy on Nov 19, 2008 7:27 AMHi Hussaini,
Here are the steps.
1> Customization needs to be completed in SPRO. Logistics Execution -> Mobile Data entry section. Also compare entries with LM01 for understanding.
2> In the 'Define menu management', you can create dynamic menus. For Menu or transaction type, if you enter "1", a menu appears; if you enter "2", a transaction appears. Custom transactions can be created and assigned here.
Once that is done, when you execute LM01 you will see your custom transactions come up. Make sure that these are created keeping in mind the RF device screen size and limitations.
Regards,
Anand. -
Creation Of Custom Transaction For RF enabled devices "mobile data entry"
Hello Everyone,
i need some information, or some material or some example's for creating custom transactions that will invoke the standard good issue transaction of sap from the handled device using the RF , so can anybody give some reference which will help me in creating custom transaction for a RF enabled handled device, which will invoke the standard sap goods issue transaction( mb1a) ,, there are some LM-transaction which do goods issue from the RF enabled handled device, but in my case i want to do goods issue using reservation as my input, so can anybody guide me or send some reference material matching to my problem, i would really appreciate it..
thanks in advance...
sapient2006Hi Hussaini,
Here are the steps.
1> Customization needs to be completed in SPRO. Logistics Execution -> Mobile Data entry section. Also compare entries with LM01 for understanding.
2> In the 'Define menu management', you can create dynamic menus. For Menu or transaction type, if you enter "1", a menu appears; if you enter "2", a transaction appears. Custom transactions can be created and assigned here.
Once that is done, when you execute LM01 you will see your custom transactions come up. Make sure that these are created keeping in mind the RF device screen size and limitations.
Regards,
Anand. -
Call Bundling for custom bapi for mass data processing
Hi all,
http://help.sap.com/saphelp_erp2005vp/helpdata/en/4c/4c0e96725311d396a80004ac96334b/frameset.htm
can i create a custom bapi where i can compress created update tasks. Not single inserts but a single sql insert with many records.
Are there some SAP FM in order to do it? Documentation says, i must do "Operations in buffer" and "Update buffer data".
Regards
PaulIs ABAPFIELD an IMPORTING parameter?
> Total Questions: 17 (15 unresolved)
Maybe you should consider cleaning up your old posts.
Rob -
hi,
i have posted(adjusted) a account document with a reference number (belnr1) and using bapi bapi_acc_document_post.now this bapi creates a document (belnr2).now my requirment is using FB02 change the document belnr1,pass the belnr2 in the document header text(the text will be 'adjusted document: belnr2').is there nay any bapi/functional module to just open the document(fb02) and pass header text only.
Thanks,
challa.Hi
There is no need for a BAPI.
First manually enter some text and save.
double click or go to change mode
takes you some Text editor
from menu GOTO-> HEADER
it will display the 4 parameters OBJECT,ID,OBJECTNAME and LANGUAGE
notedown the OBJECT and OBJECTNAME and ID
they are constants OBJECTNAME is nothign but the Document Number (BELNR)
Now write a small program using CREATE_TEXT and pass these 4 parameters and upload the long texts
it will create the long texts
see the sample material long texts code.
REPORT zmm_longtext
NO STANDARD PAGE HEADING
LINE-SIZE 255.
Internal Table for Upload of Long Texts Data
DATA: BEGIN OF itab1 OCCURS 0,
matnr LIKE mara-matnr, " Material
text LIKE tline-tdline, " Long Text
END OF itab1.
Internal Table for Upload of Long Texts Data
DATA: BEGIN OF itab OCCURS 0,
matnr LIKE mara-matnr, " Material
text LIKE tline-tdline, " Long Text
END OF itab.
To create Long Text lines for CREATE_TEXT function module
DATA:BEGIN OF dt_lines OCCURS 0.
INCLUDE STRUCTURE tline. " Long Text
DATA:END OF dt_lines.
Variable declarations for CREATE_TEXT function module
DATA : dl_name TYPE thead-tdname, " Object Name
dl_lan TYPE thead-tdspras, " Language
gv_matnr TYPE matnr.
Constants
CONSTANTS:
Object ID for Long Text of Material Basic Data 1
c_best TYPE thead-tdid VALUE 'GRUN',
c_material TYPE thead-tdobject VALUE 'MATERIAL'. " Object
Parameters
PARAMETERS p_file LIKE rlgrap-filename.
At selection-screen on Value Request for file Name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Get the F4 Values for the File
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
Start Of Selection
START-OF-SELECTION.
*To Upload Flat file
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = itab1
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.
SORT itab1 BY matnr.
LOOP AT itab1.
CLEAR gv_matnr.
SELECT SINGLE matnr INTO gv_matnr
FROM mara WHERE bismt = itab1-matnr.
IF itab1-text NE ' '.
itab-matnr = gv_matnr.
itab-text = itab1-text.
APPEND itab.
ENDIF.
CLEAR itab.
ENDLOOP.
DELETE itab WHERE matnr EQ ' '.
Upload the Texts
SORT itab BY matnr.
LOOP AT itab.
dt_lines-tdformat = 'ST'.
dt_lines-tdline = itab-text.
APPEND dt_lines.
dl_lan = sy-langu.
dl_name = itab-matnr.
Call the Function Module to Create Text
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
fid = c_best
flanguage = dl_lan
fname = dl_name
fobject = c_material
save_direct = 'X'
fformat = '*'
TABLES
flines = dt_lines
EXCEPTIONS
no_init = 1
no_save = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE:/ 'Long Text Creation failed for Material'(001),
itab-matnr.
ELSE.
WRITE:/ 'Long Text Created Successfully for Material'(002),
itab-matnr.
ENDIF.
AT END OF matnr.
REFRESH dt_lines.
ENDAT.
ENDLOOP.
Regards
Anji -
Hi ABAP Gurus,
Could you please let me know of whether there is a bapi defined for the transaction FB02.
Thanks,
KishoreHi Mukesh,
I need to change the Reference key and the reason code using the transaction FB02.
I can do the same using the BDC but screen numbers keep changing based on the company code.
I need to know whether it is possible to do same using the bapi.
Thanks,
Kishore -
Hi All,
Is there any BAPI/FM for transaction FB02?
RegardsI have successfully changed the reference field (BSEG-ZUONR) for a particular item using this FM FI_ITEMS_MASS_CHANGE.
Please find the following code:
REPORT ZTEST_FB02 .
type-pools : TPIT.
DATA : W_BSEG TYPE BSEG,
W_message TYPE T100-TEXT.
data : it_errtab TYPE tpit_t_errdoc WITH HEADER LINE,
it_fldtab TYPE tpit_t_fname WITH HEADER LINE,
it_buztab TYPE tpit_t_buztab WITH HEADER LINE.
Field name to be changed
it_fldtab-fname = 'ZUONR'.
append it_fldtab.
clear it_fldtab.
Field value
W_BSEG-ZUONR = 'TEST19'.
ITEM 7
select single
bukrs
belnr
gjahr
buzei
koart
umskz
bschl
mwart
mwskz
from bseg
into corresponding fields of it_buztab
where belnr = '0902001922' and
bukrs = '3160' and
gjahr = '2006' and
BUZEI = '007'.
if sy-subrc = 0.
APPEND it_buztab.
clear it_buztab.
endif.
CALL FUNCTION 'FI_ITEMS_MASS_CHANGE'
EXPORTING
S_BSEG = W_bseg
IMPORTING
ERRTAB = it_errtab[]
TABLES
IT_BUZTAB = it_buztab
IT_FLDTAB = it_fldtab
EXCEPTIONS
BDC_ERRORS = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
perform generate_message.
write : w_message.
else.
write : 'Updated successfully'.
ENDIF.
& Form generate_message
FORM generate_message .
CLEAR W_message.
read table it_errtab index 1.
if sy-subrc <> 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = it_errtab-ERR-MSGID
lang = sy-langu
no = it_errtab-ERR-MSGNR
v1 = it_errtab-ERR-MSGV1
v2 = it_errtab-ERR-MSGV2
v3 = it_errtab-ERR-MSGV3
v4 = it_errtab-ERR-MSGV4
IMPORTING
msg = W_message
EXCEPTIONS
not_found = 1
OTHERS = 2.
endif.
ENDFORM. " generate_message
regards,
vamshi tallada -
Creation of Customized field for Pricing Condition tables
Hi Friends
I have a requirement to create a Pricing condition table with Customized field starts with 'Z' and
Field length should be more than 80.
After creating New Customized Field, system is not allowing to create Pricing Condition table and giving error 'Too Many fields selected (larger than 100 bytes)'.
Could you please advice how to over come this error and Maximum field to create Pricing condition table .
Thanks
RaviHi there,
Table & table attributes are defined by the ABAPers. Not by finctional consultants.
You need to have an access key to define new tables & access sequence.
Check with your ABAPer. He will be able to help you with that.
Regards,
Sivanand -
Need a BAPI for FD01(customer Master data creation)
Hi Experts,
i want to upload a data from Legacy to sap for FD01 Tcode for Customer master creation, and what is the key points to dev bapi.
can anyone give me the BAPI for FD01.
Thanks,
sudha.Hi,
use bapi 'BAPI_CUSTOMER_CREATE' to create customer and bapi
'BAPI_VENDOR_CREATE' to create vendor.
Regards,
SuryaD. -
BAPIs fpr T-Codes FV70 and FV-75 for creation of Customer Invoices
Hi all,
Can any1 tell me Validation BAPIs for T-Codes FV70 and FV75.
Please bear the following points
1. The BAPI should NOT create Parked Customer Invoices, they should just validate that the data to create the customer invoice.
2. The Transaction are used for CUSTOMER invoices NOt Vendor.
3. I've searched SDN and I got the follwing BAPIs
a. BAPI_INCOMINGINVOICE_PARK
b. MRM_INVOICE_PARK
c. MRM_PARKED_INVOICE_ACCDATA
But they are all for Vendor Invoices and CREATE parking invoices, Both the things I do not want.
If someone knows the name of the BAPI please forward to me at the earliest.
Cheers
AbhishekHi Eric,
Many thanks, I'll check the BAPI out, meanwhile can u also tell me whether there is a BAPI for creating Parking documents, i.e. BAPIs for T-Codes for FV70 and FV75.
I've tried to find a lot about this, but they say that BAPIs are there for only posting, not parking the Customer Invoices.
Cheers
Abhishek -
Customer Master BAPI for PI interface
Hai Frds,
We are using the PI interface for taking Customer data from Legacy and creating in ECC. For this we are using BAPIs. We have some BAPIs for customer creation but all are for online creation only. Is there any BAPI for creating the customer through Interface.
I found one BAPI : /SAPNEA/SMAPI_CUSTOMER_CREATE.
But its creating the customer with reference customer only. Also there is no Reconciliation Account field which is mandatory for our req.we have to send status(both immediate and batch) back to Legacy for each document posted in ECC. If i will use IDOC i have to use one INBOUND IDOC for getting data in to SAP and one OUTBOUND IDOC for sending status(which i have catch from some Ztable) to legacy . All this is Lengthy process to do. So, we planned to go for BAPIs which will catch status immediately.
So, Looking for BAPI for customer master.
Maybe you are looking for
-
My phone has been acting up since yesterday afternoon. When I click on phone, email, or texts, it goes to a loading screen and then reverts back to home. It will let me go on facebook or instagram, strangely. The back, home, search buttons and all
-
Report to get the forward dated orders /standing orders
Hi Expert, Is there any standard report to get forward dated orders /standing orders . Thanks in advance ..
-
Dynamic dropdown based on user selection of another dropdown on the same page
hi all, ok, I have a table which contains use data, a name, and a userID. for the example lets say "Simon Bullen" and my userID is "999". on a form I have, there is a dropdown box, which is dynamic from this table, and allows me to select Simon Bulle
-
Dear experts is there a straightforward way, firstly to list all invoices booked within a year for a given purch org, and secondly to find out which are linked to a purchase order, and which aren't? Kind regards Sergei Volkov Edited by: Sergei Volkov
-
File with clear background places with white background
Hi, I upgraded to PS10 and when try to place a saved pdf in IDCS2 the background changes from clear to white. Is there a way to place it so the background doesn't show? Am I mixing up Illustrator and PS10 functions? Thanks, Garrett