BAPI CODE
Hi,
I am using a RFC function (Z_LV***) in web dynpro application.
I have 4 input(import) parameters as
<b>Parameter Name</b> <b>Associated Type</b>
Number BAPIP0001-PERNR
QuotaBeg BAPIABWKON-QUOTABEG
In custom controller> implementation in wdDoInit() method> how to create new element in Bapis and other nodes.
I am following Flightlist TutorIAL.
cAN SOMEONE HELP IN THIS CODE?.
THANKS,
DEEPTI PATIL
CAN SOMEONE HELP ME IN CODE OF THIS?
Hello Deepthi,
The problem that i found is that in the value binding part, you are initializing a class instead you pass corresponding context value to the input parameter of the RFC.
Try to hardcode the values and try:
Eg:
input.setnumber( 12); // Thinking that the parameter type as int
input.setdestination_from( "delhi"); // considering as String
You may follow this link for any clarification:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/7d646a6c-0501-0010-b480-bf47b8673143?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#15 [original link is broken]
For binding the model context to component controller; Drag from source to target as a whole; but when you try to bind with view controller, you have to create separate binding for input and output.
Regards
Vinod V
Similar Messages
-
Hi,
Any one have BAPI code for the combination of these
VBAK-VBELN, with
VBAK-KUNNR, VBKD-BSTKD, VBAK-AUDAT,
VBAK-VKORG, VBAK-IHREZ, vbak-netwr, vbak-waerk,
likp-bolnr,
And also need to check VBELN customer user as internal or external.
Regards,
MarutiYes, It is new dev.
I need to display all these fields from . -
HI FRNDS I NEED BAPI CODE FOR
SCHEDULE LINES AND PURCHASE REQISITION.
PLZZ FRNDS ITS URGENT.
WITH REGARDS,
SANJAYhello
go to transaction bapi
in the hierarchical node:
Go to Material management/purchasing/PurchaseRequisition
Please reward with points if usefull, thanx. -
Sample Bapi code for creating orders
HI all,
ive been working on creating an order using idoc_input_orders and couldnt do it because of 2 fields. now changed my decission and thinking of writing a bapi to do the same. has anybody got the sample code for mapping and filling in the bapis before calling bapi for creating an order. Could somebody help me with a sample code and i could use it as a reference before starting coding.
thanks,
KiranSee if this helps.
one order with total sum of effort
clear: l_order_header,
l_salesdocument,
l_order_partners,
l_order_items,
l_order_schdl.
refresh: it_order_items,
it_order_partners,
it_order_schdl,
it_return.
???????? get from material ...
Order header
l_order_header-doc_type = 'ZQBV'.
l_order_header-distr_chan = '10'.
l_order_header-division = '00'.
if g_qals-werk eq '1100'.
l_order_header-sales_org = '1000'.
else.
if g_qals-werk eq '3100'.
l_order_header-sales_org = '3000'.
else.
message i001(00) with text-005.
endif.
endif.
l_order_header-purch_no_c = g_qals-prueflos. " <= lot
Partner data
l_order_partners-partn_role = 'AG'.
l_order_partners-partn_numb = g_qals-kunnr.
append l_order_partners to it_order_partners.
Order items => only one
l_order_items-itm_number = 10.
l_order_items-material = g_qals-matnr.
l_order_items-target_qty = 1.
append l_order_items to it_order_items.
Schedules for quantity
l_order_schdl-itm_number = 10.
l_order_schdl-req_qty = 1. " <= only 1 !
append l_order_schdl to it_order_schdl.
Conditions for value
l_order_conditions-itm_number = 10.
l_order_conditions-cond_type = 'PR00'.
l_order_conditions-cond_value = g_effort_sum.
l_order_conditions-currency = g_effort_unit.
append l_order_conditions to it_order_conditions.
BAPI to create sales order
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
SALESDOCUMENTIN =
ORDER_HEADER_IN = l_order_header
ORDER_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = l_salesdocument
TABLES
RETURN = it_return
ORDER_ITEMS_IN = it_order_items
ORDER_ITEMS_INX =
ORDER_PARTNERS = it_order_partners
ORDER_SCHEDULES_IN = it_order_schdl
ORDER_SCHEDULES_INX =
ORDER_CONDITIONS_IN = it_order_conditions
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF =
ORDER_CFGS_INST =
ORDER_CFGS_PART_OF =
ORDER_CFGS_VALUE =
ORDER_CFGS_BLOB =
ORDER_CFGS_VK =
ORDER_CFGS_REFINST =
ORDER_CCARD =
ORDER_TEXT =
ORDER_KEYS =
EXTENSIONIN =
PARTNERADDRESSES =
if not l_salesdocument is initial.
order successfully created
message i001(00) with text-001 l_salesdocument.
endif.
endif. -
ME51n with BAPI (Code Fixed in unfoudable in the bapi BAPI_REQUISITION_CREA
Hi,
For transaction ME51n, we can see on the tabscript "Quantities/date" for items the field "Fixed in."
(This field is symbolized by a check box).
I would like to know if we can feed this field with the Bapi BAPI_REQUISITION_CREATE. I've seek this field in the bapi bit i didn't find it.
with regards
Jluc LedouxBAPI_REQUISITION_CREATE (and BAPI_REQUISITION_CHANGE) are related to the old transactions ME51 (ME52) the BAPI related to enjoy transactions ME51N (and ME52N) are [BAPI_PR_CREATE|https://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_pr_create&cat=sdn_all] (and BAPI_PR_CHANGE)
Field is bapimereqitem-fixed
For more information look at [Note 499627 - FAQ: BAPIs for purchase requisitions|https://service.sap.com/sap/support/notes/499627]
Regards -
Hi all,
i am using BAPI_FIXEDASSET_CREATE1 to upload asset data. in this function module there is a mandatory parameter that is key regarding this i am getting a dump error. saying that <b>Type is correct but incorrect for key length</b>. here is my declaration .
data: begin of wa_companycode occurs 0.
include structure BAPI1022_KEY.
data End of WA_Companycode.
WA_COMPANYCODE-COMPANYCODE = WA_SOURCE-BUKRS.
CALL FUNCTION 'BAPI_FIXEDASSET_CREATE1'
EXPORTING
key = WA_COMPANYCODE-COMPANYCODE
GENERALDATA = WA_GENERALDATA
* GENERALDATAX =
POSTINGINFORMATION = WA_POSTINGINFORMATION
* POSTINGINFORMATIONX =
TIMEDEPENDENTDATA = WA_TIMEDEPENDENTDATA
* TIMEDEPENDENTDATAX =
ALLOCATIONS = WA_ALLOCATIONS
* ALLOCATIONSX =
IMPORTING
ASSETCREATED = wa_Assetcreated
RETURN = wa_return
** TABLES
** DEPRECIATIONAREAS =
** DEPRECIATIONAREASX =
** INVESTMENT_SUPPORT =
** EXTENSIONIN =Make the highlighted change:
WA_COMPANYCODE-COMPANYCODE = WA_SOURCE-BUKRS.
CALL FUNCTION 'BAPI_FIXEDASSET_CREATE1'
EXPORTING
<b> key = WA_COMPANYCODE</b>
GENERALDATA = WA_GENERALDATA
GENERALDATAX =
POSTINGINFORMATION = WA_POSTINGINFORMATION
POSTINGINFORMATIONX =
TIMEDEPENDENTDATA = WA_TIMEDEPENDENTDATA
TIMEDEPENDENTDATAX =
ALLOCATIONS = WA_ALLOCATIONS
ALLOCATIONSX =
IMPORTING
ASSETCREATED = wa_Assetcreated
RETURN = wa_return
TABLES
DEPRECIATIONAREAS =
DEPRECIATIONAREASX =
INVESTMENT_SUPPORT =
EXTENSIONIN =
REgards,
Ravi -
Hi i want to execute bapi two times with different paramters....Possible
Hi,
i want to execute bapi twice times.Possible please explain where i put which code.Means i put bind code at doinit() method of conpopnent controller and execute bapi code in doinit() iof view. But for second time where i put bind and execute code.
Regards,
Gurprit
Edited by: GURPRIT BHATIA on Dec 17, 2007 1:24 PMHi Gurprit,
For executing the bapi second time, you can put the execute bapi code in the action of the button which is on your form. You need not write the bind code again.
Bye
Ankur -
Hello,
I need help to call two BAPIs in RFC Adapter. My scenario is I am getting message from third party system. By default I call a BapiX to create a deal, Then I have to call another BapiZ for commision.The thing is first I have to create it by calling BapiX and BapiZ from one message which I am getting to XI.
What is best way to do it. In XI is there any way to do this.
I am not sure do i need to use DB lookup in the mapping.
Or do i need to use RFC wrapper to put these two BAPIs.
Thanks,
SrinivasHello Amit,
I am just confused. I am using RFC adpter on reciever side.
You mean You want to use BAPI message type for the interface and create ABAP Server Proxy.
Now how can i define other RFC message type OR you want me to call other BAPI (Pasting the BAPI code)in the Server Proxy Code.
By the way i am using synchrnous call.
Thanks,
Srinivas -
Calling Bapi through BADI gives data statement error
Dear Experts,
I am trying to call BAPI through BADI ME_PROCESS_REQ_CUST --> process_item.
I get an error stating that "The addition OCCURS no longer supported in OO objects"
If, I remove OCCURS statement I get an error stating that "Tables with headers are no longer supported in OO context" for the following data statement.
Appreciate, if you could provide possible solution to overcome the problem.
Regards
Kumar
BAPI code is as follows.
DATA: LV_TABIX LIKE SY-TABIX,
LT_WMDVSX LIKE BAPIWMDVS OCCURS 0 WITH HEADER LINE,
LT_WMDVEX LIKE BAPIWMDVE OCCURS 0 WITH HEADER LINE.
LV_TABIX = SY-TABIX.
CLEAR: LT_WMDVSX, LT_WMDVEX.
REFRESH: LT_WMDVSX, LT_WMDVEX.
Fill communication table
LT_WMDVSX-REQ_DATE = ET_PROCUREMENT_ITEM-DELIV_DATE.
LT_WMDVSX-REQ_QTY = ET_PROCUREMENT_ITEM-QUANTITY.
APPEND LT_WMDVSX.
Availability check with check rule '03'
CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
EXPORTING
PLANT = ET_PROCUREMENT_ITEM-PLANT
MATERIAL = ET_PROCUREMENT_ITEM-MATERIAL
UNIT = ET_PROCUREMENT_ITEM-UNIT
CHECK_RULE = '03'
TABLES
WMDVSX = LT_WMDVSX
WMDVEX = LT_WMDVEX
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC EQ 0.
READ TABLE LT_WMDVEX WITH KEY
COM_DATE = ET_PROCUREMENT_ITEM-DELIV_DATE.
IF SY-SUBRC EQ 0.
ET_PROCUREMENT_ITEM-AVAIL_QTY = LT_WMDVEX-COM_QTY.
ENDIF.
ENDIF.Hi,
Occurs is no more supported by SAP ( is an obsolete statement )
<b>Instead of following code</b>
DATA: LV_TABIX LIKE SY-TABIX,
LT_WMDVSX LIKE BAPIWMDVS OCCURS 0 WITH HEADER LINE,
LT_WMDVEX LIKE BAPIWMDVE OCCURS 0 WITH HEADER LINE.
you can use
data: LT_WMDVSX type standard table of BAPIWMDVS,
LT_WMDVEX type standrad table of BAPIWMDVE,
LS_WMDVSX like line of LT_WMDVSX , "( work area )
LS_WMDVEX like line of LT_WMDVEX. "(work area)
use workarea to get the data and then append the records from workarea to Internal tables
Reward points if usefull
Regards,
Mohan -
How to change currency in PO item by using BAPI 'BAPI_PO_CREATE1'
Hi. i want to change currency in PO item.i just find this field in condition table in this BAPI. code is as below
*POPULATE condition data
CLEAR t_po_condition.
t_po_condition-ITM_NUMBER = v_poitem * 10. " Item No.
t_po_condition-COND_TYPE = 'PBXX'. " Condition type
t_po_condition-CALCTYPCON = C_B. " Calculation type
t_po_condition-COND_VALUE = SEQ_FILEH-NETPR. " Condition value
t_po_condition-CURRENCY = SEQ_FILEH-WAERS.
t_po_condition-COND_P_UNT = SEQ_FILEH-PEINH.
t_po_condition-CONDCHAMAN = c_x.
t_po_condition-COND_UPDAT = c_x.
APPEND t_po_condition.
*POPULATE condition data flags
CLEAR t_po_conditionX.
t_po_conditionX-ITM_NUMBER = v_poitem * 10.
t_po_conditionX-ITM_NUMBERX = C_X.
t_po_conditionX-COND_TYPE = C_X.
t_po_conditionX-CALCTYPCON = C_X.
t_po_conditionX-COND_VALUE = C_X.
t_po_conditionx-CURRENCY = C_X.
t_po_conditionX-COND_P_UNT = C_X.
t_po_conditionx-CONDCHAMAN = c_x.
t_po_conditionx-COND_UPDAT = c_x.
APPEND t_po_conditionX.
any advice?Just Select The Total Column, then Drag & Drop accordingly..
whereever you want..
Alternatively you can do by
in the top right corner of the item overview you have a button for table control (above the vertical scroll bar).
If you click that button, you get a pop-up from where you can customize the layout.
Press the blue info button there and read how this is to be done. -
Working on Well Creation Program using BAPI
Hi,
My requirement is to be create well using standard BAPI
'BAPI_WELLID_CREATE'. T-code is O3U_Wl1.
When I am calling this bapi into my program it's not creating entries in O3U_Wl3.
Can anyone please help me out?
Thank-You,
SonyI am not able to see this bapi in my system but just to add a note here -
Check in BAPI Code if there is something like this at the end of fm.
IF lf_commit_requested NE ' '.
COMMIT WORK.
ENDIF.
If it is present, keep a break point at IF statement. Set IF_COMMIT_REQUESTED in debug to 'X'. And see. This will save data.
You may have to try this explicitlye in custom program. Some BAPIs save data only when they are used in a custom program. So create a custom program, pass parameter values, call bapi and use COMMIT WORK. This should help you out. It is strange but it has worked for me.
Message was edited by: Ashish Gundawar -
Concept of 'x' fields mapping in BAPI
Hi Experts,
Please explain the concept of 'x' fields mapping in BAPI. Why do we need that ?
Thanks
~Sid
"Max points are guarenteed"As the previous answer says, it's a "true / false" flag to say you want the changes applied to a particular field... the BAPI code cannot just say:
if not some_field_name is initial.
change value of some_field_name.
endif.
because the initial value may be a valid value for "some_field_name" so you wouldn't be able to clear the field out with this logic.. so instead the BAPI logic is more like:
if some_field_name_flag = 'X'.
change value of some_field_name.
endif. -
How to run the BAPI after creation or Modification ?
HI Abapers,
How to run the BAPI after creation or Modification ? What is the step by step procedure to run the the BAPI?
Immediate reply is highely appriciable.
Regards,
Chow.Hi
If you have done with BAPI creation correctly Run it similar to the fun mdule which we run in SE37 calling this BAPi in the program with CALL FUNCTION and passing the necessary parameters
see the sample bapi code how it is called in Program
data : w_resb_header like bapirkpfc.
data: begin of itab_resb occurs 0.
include structure bapiresbc.
data: end of itab_resb.
data: begin of itab_bapi_return occurs 0.
include structure bapireturn.
data: end of itab_bapi_return.
data : w_resb_no like bapirkpfc-res_no.
w_resb_header-plant = p_werks.
w_resb_header-res_date = sy-datum.
w_resb_header-created_by = sy-uname.
w_resb_header-cost_ctr = '0000010001'.
w_resb_header-move_type = '201'.
w_resb_header-gr_rcpt = w_room_time.
w_resb_header-part_acct = 'OR'.
*ITEM DATA
loop at i_details.
itab_resb-material = i_details-matnr.
itab_resb-plant = i_details-werks.
itab_resb-store_loc = i_details-lgort.
itab_resb-quantity = i_details-qty.
itab_resb-unit = i_details-meins.
append itab_resb.
clear itab_resb.
clear i_details.
endloop.
call function 'BAPI_RESERVATION_CREATE'
exporting
reservation_header = w_resb_header
NO_COMMIT =
MOVEMENT_AUTO =
importing
reservation = w_resb_no
tables
reservation_items = itab_resb
return = itab_bapi_return
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
IMPORTING
RETURN = .
wait up to 5 seconds.
w_resb_no contains your reservations numnber
Regards
Anji -
Hi,
I have a requirement where I need to develop a upload program (from flat file) for MI01 and MI04 t-code. I have created a BDC for MI01 t-code which is running successfully. But I cant able to create the same for MI04 t-code. And also I didnt find any such kind or MI04. instead I found a lot of posts suggesting for BAPI (instead of BDC).
After all this I decided to go for BAPI which I haven't developed till now. With this situation I searched it (BAPI for MI04) in the forum. But I could not find a complete code. In almost all the posts, only part of the code i.e FM's are listed. As I am new to the BAPI, I was searching for a complete code (BAPI for MI04).
Can anyone post the BAPI code for MI04 transaction.
Regards,
Praveenuse ''BAPI_MATPHYSINV_COUNT' bapi...
u have to fill all the structures or ITAB which are mandatory. Then pass them to this BAPI. after that use BAPI_TRANSACTION_COMMIT to update the database
and how to create .txt file to upload data to this transaction.
the text file should contain all the fields which are necessary to pass to bapai structures /ITABs
better , u can run the corresponding trn.. to know all mandt fields
U can use GUI_upload to upload the flat file.
Reward if useful -
I want bapi real time scenario ? please help to me
hai friends,
I want bapi real time scenario.please help in bapi.
my id :[email protected]
regards,
sivahi siva,
for full information on BAPI's, check these links.....
http://help.sap.com/saphelp_47x200/helpdata/en/7e/5e12224a1611d1894c0000e829fbbd/frameset.htm
this link as everything like how to use bapi, code examples etc..
reward me if useful......
Harimanjesh AN
Maybe you are looking for
-
Is it possible to convert a NTFS external drive to HFS extended?
My daughter saw the light and changed from a Sony laptop to an Intel iMac. The problem is that she has 2 USB2 external drives that were formatted as NTFS. I spent some frustrating time today with the one of the drives and Disk Utility. Disk Utility k
-
Copying items in Apple Remote Desktop
According to the manual, you should be able to copy items between the local and remote computer, either by dragging or by selecting "Copy Items" button. But each time I try, it gave me an error message saying the "This task is not supported on the re
-
What exactly is in the in-app purchase in the new Garageband?
I've found that the lessons in the old version of Garageband are the same as the new one. If you have the old verison and donwload the lessons from it, you also have the lessons for the new version without paying extra. Likewise, it seems, with many
-
Writing client app to connect to Exchange Server 2013 and set OOF for users on vacation
I am coding an C# app that should connect to Exchange Server 2013 on-premise (Servers Location is not in our Company). I`ve got an account (User and Pass) with readonly admin-rights for now and want to read and set OutOfOffice Objects for other users
-
ITunes download very slow today?
I try to download "The walking dead season one" and Itunes calculate 4 hours for download. Normally I need with my 50mbit connection 10 minutes for this job. Is there a problem with Itunes server? Anybody here with same problem?