Bapi : BAPI_ALM_ORDER_MAINTAIN not updating table AFVU-USR08
Hi,
I have a requirement to update table AFVU-USR08.I am actualy dealing with tcode IW32/IW33 where in we need to update operation-->enhancement tab.I am using BAPI : BAPI_ALM_ORDER_MAINTAIN to do this.I am testing the BAPI directly( Not called in any program ),I can see a message like so and so order saved under notification,But there is no entry in table AFVU-USR08.
If any one have come across this prob. and got the sol. Pl. share it with me.
Your solution will be more helpful.
Thanks,
Bharani.
Hi Ferry,
1. I have also tried ur given code before BAPI_TRANSACTION_COMMIT.
l_fname = 'SOBKZ'.
l_fvalue = 'U'.
CALL FUNCTION 'CO_BH_MOD_SINGLE_FIELDS'
EXPORTING
aufnr_imp = wa_meth-objectkey(12)
field1 = l_fname
value1 = l_fvalue.
but this program is giving dump for only this particular Value saying that This is PROTECTED field.
Can anyone help me out on How to Update Special Stock Indicator on Components Tab of Maintenance Order (IW32).
If anyone has faced such type of problem & solved it then please let me also.
2. Which BADI to use for Updating Special Stock Indicator when we press enter on Components tab in Transaction IW32 ?..
Thanks in advance,
Hope to get the solution soon from all SAP gurus.
and help will be appriciated .
Gaurav.
Similar Messages
-
When executing the code it gives an error that
3110 3111 mack7 is not contained in the physical inventory document
where mack7 is matnr .
3110 is plant
while actuaaly it is present.
report Z_PHYSICAL
no standard page heading line-size 255.
TYPE-POOLS: truxs.
tables : ikpf.
TYPES: BEGIN OF t_datatab,
col1(30) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
COL4(30) TYPE C,
col5(30) type c,
END OF t_datatab.
data: x type i.
data : iblnr1 like IKPF-IBLNR.
data : gjhar like IKPF-GJAHR.
data : v_wait like bapita-wait value 'X'.
data : count_dat like IIKPF-ZLDAT.
data : items like BAPI_PHYSINV_COUNT_ITEMS occurs 0 with header line.
data : return like BAPIRET2 occurs 0 with header line.
DATA: it_datatab type standard table of t_datatab,
wa_datatab type t_datatab.
DATA: it_raw TYPE truxs_t_text_data.
PARAMETERS: p_file TYPE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
start-of-selection.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
i_line_header = ''
i_tab_raw_data = it_raw " WORK TABLE
i_filename = p_file
TABLES
i_tab_converted_data = it_datatab[] "ACTUAL DATA
EXCEPTIONS
conversion_failed = 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.
ENDIF.
loop at it_datatab into wa_datatab.
on change of wa_datatab-col1.
iblnr1 = wa_datatab-col1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = iblnr1
IMPORTING
OUTPUT = iblnr1
gjhar = wa_datatab-col2.
count_dat = wa_datatab-col3.
clear x.
endon.
x = x + 1.
items-material = wa_datatab-col4.
*unpack items-material to items-material.
items-ENTRY_QNT = wa_datatab-col5.
*CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = items-material
*IMPORTING
OUTPUT = items-material
items-batch = ''.
items-item = x.
append items.
CALL FUNCTION 'BAPI_MATPHYSINV_COUNT'
EXPORTING
physinventory = iblnr1
fiscalyear = gjhar
PERCENTAGE_VARIANCE =
COUNT_DATE = count_dat
tables
items = items
return = return
SERIALNUMBERS =
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = v_wait
IMPORTING
RETURN = return
if sy-subrc eq 0.
endif.
clear items . refresh items.
endloop.Hi Chaitanya,
See if the user Customer-Exit EXIT_SAPMM07M_001 is implemented. (Customer Function Exit: Set Segment Text in Material Document).
Enhancement SMOD: MBCF0002
Regards
Bruno Xavier. -
'BAPI_ALM_ORDER_MAINTAIN' Not Updating Fields
Hi,
We are using BAPI_ALM_ORDER_MAINTAIN to update Special Stock indicator
(RESB-SOBKZ) at component level for a service order (IW32).
BAPI is not updating the value which we are passing for this field but
intrestingly BAPI is updating rest of the fields at component level,
like Component Quntity, Componen Plant etc. Only Special Stock
Indicator field is an exception.
We are passing value in "BAPI_ALM_ORDER_COMPONENT-SPECIAL_STOCK" field
and updating BAPI Update table with X for this field.
Can somebody provide help on this.
Steps for the Reconstruction
Below is the source code which i am using to update Srvice order via
this BAPI
REPORT zbapi .
DATA t_meth TYPE TABLE OF bapi_alm_order_method.
**Internal table for Operation (BAPI)
DATA t_oper TYPE TABLE OF bapi_alm_order_operation.
DATA t_comp TYPE TABLE OF bapi_alm_order_component.
**Internal Table for Opertaions UP (BAPI)
DATA t_comp_up TYPE TABLE OF bapi_alm_order_component_up.
**Internal table for BAPI Return code
DATA t_ret TYPE TABLE OF bapiret2.
***WORK AREA DECLARATIONS
**Work Area for Hedaer
DATA:wa_header TYPE caufvdb,
wa_meth TYPE bapi_alm_order_method,
wa_op TYPE afvgb,
wa_comp TYPE resbb,
wa_comp1 TYPE bapi_alm_order_component,
wa_comp_up TYPE bapi_alm_order_component_up,
wa_oper TYPE bapi_alm_order_operation.
PARAMETERS:TEST.
****Fill Method Internal table
CLEAR wa_meth.
wa_meth-method = 'SAVE'.
APPEND wa_meth TO t_meth.
wa_meth-refnumber = sy-tabix.
wa_meth-objecttype = 'COMPONENT'.
wa_meth-method = 'CHANGE'.
wa_meth-objectkey(12) = '000004000104'.
wa_meth-objectkey+12(4) = '0010'.
wa_meth-objectkey+16(4) = '0010'.
APPEND wa_meth TO t_meth.
**Component Internal table
wa_comp1-reserv_no = '0000001072'.
wa_comp1-res_item = '0001'.
wa_comp1-activity = '0010'.
wa_comp1-item_number = '0010'.
wa_comp1-special_stock = 'B'.
wa_comp1-requirement_quantity = '15'.
wa_comp1-stge_loc = '0001'.
wa_comp1-backflush = 'X'.
APPEND wa_comp1 TO t_comp.
**Component Update Internal table
wa_comp_up-special_stock = 'X'.
wa_comp_up-backflush = 'X'.
wa_comp_up-requirement_quantity = 'X'.
wa_comp_up-stge_loc = 'X'.
APPEND wa_comp_up TO t_comp_up.
**Call Bapi
BREAK-POINT.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = t_meth
it_component = t_comp
it_component_up = t_comp_up
return = t_ret.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.Hi Ferry,
1. I have also tried ur given code before BAPI_TRANSACTION_COMMIT.
l_fname = 'SOBKZ'.
l_fvalue = 'U'.
CALL FUNCTION 'CO_BH_MOD_SINGLE_FIELDS'
EXPORTING
aufnr_imp = wa_meth-objectkey(12)
field1 = l_fname
value1 = l_fvalue.
but this program is giving dump for only this particular Value saying that This is PROTECTED field.
Can anyone help me out on How to Update Special Stock Indicator on Components Tab of Maintenance Order (IW32).
If anyone has faced such type of problem & solved it then please let me also.
2. Which BADI to use for Updating Special Stock Indicator when we press enter on Components tab in Transaction IW32 ?..
Thanks in advance,
Hope to get the solution soon from all SAP gurus.
and help will be appriciated .
Gaurav. -
ERROR IN FILE--XI--RFC SCENARIO. BAPI did not UPDATE the DATABASE TABLE
Hi
I have created a scenario FILE -XI- RFC
File is picked by file adapter - Its working fine
I have used BPM
In RFC side i used BAPI_INCOMINGINVOICE_CREATE
Its working fine and return an Invoice Number and Fisical year .
When i Check this in the R/3 System , in Invoice no Does not Exist .
Message mapping is ok
SXMB_MONI all are ok
Receiver file i got the invoice no and fisical year .
The Problem is " DATABASE TABLE DID NOT UPDATED "
So should i do BAPI_COMMIT seperately ........
Any solution ................
VERY VERY URGENT .....
thanks in advance
B.Judehi jude,
Commit Control for Single BAPI Calls
If you want to use this communication channel to call BAPIs as remote-enabled function modules that change data in the database, set the indicator.
If executed successfully, the transaction is written to the database by calling the function module BAPI_TRANSACTION_COMMIT explicitly. If an error occurs, the transaction is rolled back by BAPI_TRANSACTION_ROLLBACK.
The result is determined by the value of the field TYPE in parameter RETURN. If successful, the tables are empty and the values , S, I, and W are displayed. All other values are regarded as errors.
To change this setting, set the indicator BAPI Advanced Mode.
<b>In the Successful RETURN-TYPE Values table, enter the values that should lead to a successful execution.</b>
Regards,
Mandeep Virk -
BAPI_ALM_ORDER_MAINTAIN not Updating Special stock indicator field
Hi Experts
I am using BAPI_ALM_ORDER_MAINTAIN to create and then update a Customer Service Order. When am trying to update the Special stock indicator field in the Components Tab(of IW32) through BAPI, its not doing so, and no error is thrown as well.
The required qty and the batch field in the components tab get updated which ensures that the logic am using is the correct one.
Please let me know if anyone has faced such a situation before. Any workaround(some other FM) to update this field is also welcome.
Points guaranteed.
Thanks
Kulpreet Singh.Hi!
BAPI_ALM_ORDER_MAINTAIN is only updating a field, when you set the update flag also in CHANGE method.
So if you are maintainig the IT_COMPONENT table, you have to put an 'X' into the same field in the IT_COMPONENT_UP table also.
And of course don't forget to commit the modification.
Regards
Tamá -
Bug in PL/SQL - Does not update Table if table name & variable name same in
Dear All,
If tabale name & vairable name is same in a Stored Procedure, UPDATE to table does not take place.
For example run following 2 procedures. First procedure does the insert properly to table but second procedure does not update the table.
create or replace procedure BugDemo1
as
LAST_NAME VARCHAR2(30);
FIRST_NAME VARCHAR2(30);
Begin
LAST_NAME := 'Prasad';
FIRST_NAME := 'Raghnandan';
Insert into com_people (id,Roles, LAST_NAME, FIRST_NAME) values (77777,'Patient', LAST_NAME, FIRST_NAME);
end;
create or replace procedure BugDemo2
as
LAST_NAME VARCHAR2(30);
FIRST_NAME VARCHAR2(30);
Begin
LAST_NAME := 'Pra';
FIRST_NAME := 'Raghu';
Update com_people set
LAST_NAME = LAST_NAME,
FIRST_NAME = FIRST_NAME
where id = 77777 ;
end;
------------------------------------------Hi,
It is not a bug. Oracle is updating the records. Here Oracle is treating the variable name as COLUMN_NAME. Since priority is higher for a COLUMN on variable so each column is getting updated by itself resulting no change in data.
SQL> CREATE TABLE com_people
2 (
3 id NUMBER (5),
4 Roles VARCHAR2(20),
5 LAST_NAME VARCHAR2(20),
6 FIRST_NAME VARCHAR2(20)
7 )
8 ;
Table created
SQL> Insert into com_people (id,Roles, LAST_NAME, FIRST_NAME) values (77777,'Patient', 'LAST_NAME', 'FIRST_NAME');
1 row inserted
SQL> COMMIT;
Commit complete
SQL>
SQL> create or replace procedure BugDemo2
2 as
3 LAST_NAME VARCHAR2(20);
4 FIRST_NAME VARCHAR2(20);
5 Begin
6 LAST_NAME := 'Pra';
7 FIRST_NAME := 'Raghu';
8
9 Update com_people set
10 LAST_NAME = LAST_NAME,
11 FIRST_NAME = FIRST_NAME
12 where id = 77777 ;
13
14 DBMS_OUTPUT.PUT_LINE('UPDATED ROWS ='||SQL%ROWCOUNT);
15 end;
16 /
Procedure created
SQL> set serveroutput on
SQL> execute BugDemo2;
UPDATED ROWS =1
PL/SQL procedure successfully completed
SQL> Regards -
Rows not updating table in OOPs alv
Hi All,
Hope all are doing fine!!!
I have a created an alv report in OOPS ,,,when for the first time i change/edit the rows and press save ,,the records/rows are updating in db table ,.BUT next time if i change/edit the rows and press save button again its not updating the rows..
am using object of type cl_alv_changed_data_protocol to get the changed data ,,,,its working fine for the first time but next time its empty its not having any value for changed data.
pls kindly let me know how to fix it..
Thanks
JackHi JAck,
As soon as you hit the save button, in debug see if the work area has the changed data, to make sure that it is not getting cleared, once that is done, you can check step by step where the data is getting lost...
Thanks,
Srini. -
Hi All,
We have found a discrepancy in the goods receipt process . When i do a manual process using MIGO i see the following in the doc flow.
Doc. Date Overall ProcessingStat.
. Purchase order 56005883 08/30/06
STO Delivery 87068558 08/30/06 Completed
. WMS transfer order 6002450608 08/31/06 Completed
. TF to stck in trans. 49806781 09/03/06 complete
. Service Confirmation 09/03/06 Completed
. Goods receipt 5000074657 09/12/06 Completed
But when i do the goods receipt using the BAPI 'BAPI_GOODSMVT_CREATE'the doc flow does not get updated.
. Purchase order 56007669
STO Delivery 87115631 09/26/06 Completed
. WMS transfer order 6002478832 09/26/06 Completed
. TF to stck in trans. 49853247 09/26/06 complete
But still i can see that the delivery has benn goods recieved. Has anyone come across a simiar isssue before? Please help.
Regards,
Hari.
For a standard STO that has been received with MIGO this is the doc flow -- notice the goods receipt at the end.Here is a sample code where it works:
***********HEADER
w_goodsmvt_header-pstng_date = sy-datum.
w_goodsmvt_header-ref_doc_no = i_likp-vbeln.
***********Goods Movement Code
w_goodsmvt_code-gm_code = '01'.
***********Goods Movement Item
loop at i_lips.
i_goodsmvt_item-material = i_lips-matnr.
i_goodsmvt_item-move_type = '101'.
i_goodsmvt_item-deliv_numb = i_lips-vbeln.
i_goodsmvt_item-deliv_item = i_lips-posnr.
i_goodsmvt_item-plant = w_destplant.
i_goodsmvt_item-stge_loc = i_lips-lgort.
i_goodsmvt_item-entry_qnt = i_lips-lfimg.
i_goodsmvt_item-entry_uom = i_lips-meins.
i_goodsmvt_item-po_number = i_lips-vgbel.
i_goodsmvt_item-po_item = i_lips-vgpos.
i_goodsmvt_item-mvt_ind = 'B'.
append i_goodsmvt_item. clear i_goodsmvt_item.
endloop.
***********Test run
clear w_testrun.
*BAPI call
call function 'BAPI_GOODSMVT_CREATE'
exporting
goodsmvt_header = w_goodsmvt_header
goodsmvt_code = w_goodsmvt_code
testrun = w_testrun
importing
goodsmvt_headret = w_goodsmvt_headret
materialdocument = w_materialdocument
matdocumentyear = w_matdocumentyear
tables
goodsmvt_item = i_goodsmvt_item
goodsmvt_serialnumber = i_goodsmvt_serialnumber
return = i_return.
loop at i_return where type = 'A'
or type = 'E'.
move: i_return-id to mess_tab-msgid,
i_return-number to mess_tab-msgnr,
i_return-message_v1 to mess_tab-msgv1,
i_return-message_v2 to mess_tab-msgv2,
i_return-message_v3 to mess_tab-msgv3,
i_return-message_v4 to mess_tab-msgv4.
append mess_tab. clear mess_tab.
endloop.
if sy-subrc eq 0.
i_trans-status = 'E'.
call function 'BAPI_TRANSACTION_ROLLBACK'.
else.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
importing
return = w_return.
endif. -
BAPI_GOODSMVT_CREATE not updating VBUK table and field WBSTA
Hi all,
We post good receipt for the inbound delivery using BAPI_GOODSMVT_CREATE. Upon the successful completion of GR, however, field WBSTK & GBSTK in VBUK table and field WBSTA & GBSTA in VBUP table are not getting updated from A to C for the inbound delivery.
Wondering anybody here has experienced the similar issue before? And so, how to get it fixed without having to switch to a BDC program?
Thanks,
FrancIt seems this BAPI dose not update the VBUK fields.
Edited by: Franc on Aug 11, 2008 3:12 PM -
File to rfc...database tables not updating
Hi friends..
in file to bapi ..
created ZRFC and in that rfc i given standard bapi and commit work..
i tested in sap ..the table is updating..
thru XI..the table is not updating...
it showing likw this..in receiver rfc adpater monitering...
<i>Receiver channel 'CC_IN_SAP_WorkOrderCompletion' for party '', service 'SAP_ERP_DEV' (internal name 'RfcClient[CC_IN_SAP_WorkOrderCompletion]')
Client data: {jco.client.lang=EN, jco.client.snc_mode=0, jco.client.client=400, jco.client.passwd=******, jco.webas.ignore_jdsr_error=1, jco.client.user=aar, jco.client.sysnr=10, jco.client.ashost=53.249.196.86}
Repository data: {jco.client.lang=EN, jco.client.snc_mode=0, jco.client.client=400, jco.client.passwd=******, jco.webas.ignore_jdsr_error=1, jco.client.user=aar, jco.client.sysnr=10, jco.client.ashost=53.249.196.86}
Current pool size: 1, maximum pool size : 1
Channel History
- OK: 2006-12-19 11:12:58 CET: Message processed for interface ZBAPI_ALM_CONF_CREATE</i>
and in messagemonitering audit log..
2006-12-19 11:12:58 Success Message successfully received by messaging system. Profile: XI URL: http://dcexi0602.aaaa.com:50000/MessagingSystem/receive/AFW/XI Credential (User): XIISUSERDGX
2006-12-19 11:12:58 Success Using connection AFW. Trying to put the message into the receive queue.
2006-12-19 11:12:58 Success Message successfully put into the queue.
2006-12-19 11:12:58 Success The message was successfully retrieved from the receive queue.
2006-12-19 11:12:58 Success The message status set to DLNG.
2006-12-19 11:12:58 Success Delivering to channel: CC_IN_SAP_WorkOrderCompletion
2006-12-19 11:12:58 Success RFC adapter received an asynchronous message. Attempting to send tRFC for ZBAPI_ALM_CONF_CREATE with TID XIVqvZy8z94TkgWVR9u01m0m
2006-12-19 11:12:58 Success The message was successfully delivered to the application using connection AFW.
2006-12-19 11:12:58 Success The message status set to DLVD.
please help me..
regards
ramHi Sravya..
yes i given commit work after bapi in ZRFC..
in SAP..i tested ..its updating...but thru XI..
it is showing success..
but its not updating tables...
thanks for your response
regards
ram -
BAPI_PO_CHANGE is not updating Confirmation Category and Date cate Category
Hi to all,
Am using BAPI_PO_CHANGE in my program. My program is to upload excel file and transfer the data to corresponding tables.
All the thing is working perfectly but the two fields in BAPI are not updating. They are CONF_TYPE and DEL_DATCAT_EXT in POCONFIRMATIONS( which is tables in bapi).Am giving my code below. And this POCONFIRMATIONS is available from 6.0 version.
Thanks in advance.
Shah.
LOOP AT it_ebelp INTO is_ebelp .
CLEAR: is_header, is_poitem, is_poitemx,is_confirm, is_return.
is_header-po_number = is_ebelp-ebeln.
is_poitem-po_item = is_ebelp-ebelp.
is_poitem-conf_ctrl = 'SMIC'.
APPEND is_poitem TO it_poitem.
is_poitemx-po_item = is_ebelp-ebelp.
is_poitemx-po_itemx = 'X'.
is_poitemx-conf_ctrl = 'X'.
APPEND is_poitemx TO it_poitemx.
is_confirm-po_item = is_ebelp-ebelp.
is_confirm-conf_type = 'LA'.
is_confirm-del_datcat_ext = 'D'.
APPEND is_confirm TO it_confirm.
AT END OF ebeln.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = is_header-po_number
POHEADER = is_header
TABLES
return = it_return
poitem = it_poitem
poitemx = it_poitemx
poconfirmation = it_confirm.
IF NOT it_return IS INITIAL.
LOOP AT it_return INTO is_return.
WRITE : is_return-message.
ENDLOOP.
READ TABLE it_return TRANSPORTING NO FIELDS WITH KEY type = 'E'.
IF sy-subrc <> 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x
IMPORTING
return = is_return1.
ENDIF.
ENDIF.
REFRESH: it_poitem, it_poitemx,it_confirm, it_return.
ENDAT.
ENDLOOP.Hi Shah,
I also facing the same problem which u had passed already..
could teach me how u over come this.
one more thing my sap version is 4.7 in bapi_po_change
i don't have poconfirmation
*CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder =
POHEADER =
POHEADERX =
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN =
POITEM =
POITEMX =
POADDRDELIVERY =
POSCHEDULE =
POSCHEDULEX =
POACCOUNT =
POACCOUNTPROFITSEGMENT =
POACCOUNTX =
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
i am waiting for u reply
Edited by: JJ on Sep 10, 2008 1:54 PM -
BAPI_PO_CHANGE to update the Price for the line item not updating the Price
Hi,
I am using BAPI_PO_CHANGE to update the Price for the line item. This BAPI is not updating the Price. I am using external cummit also, but the BAPI is not updating price.
I am passing following data to the BAPI.
Plant: CQ11
PO Material Price
4500002142 TEST_BATCH 12
Please provide suggestion.
Regards,
Jubin.Hi,
check this link...this has sample code
[http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm]
Regards,
Surinder -
Update table with data from dialog
Hello,
I need the problem.
I'm not update table with inputtext field where data change from dialog.
This metod is update table.
public void returnHandlerGoods(ReturnEvent returnEvent) {
// Add event code here...
ArrayList<PricatGoods> data = (ArrayList<PricatGoods>) returnEvent.getReturnValue();
BindingContainer bc = getBindings();
DCIteratorBinding dcIterBinding;
// сохранить изменения detail
dcIterBinding = (DCIteratorBinding) bindings.get("findVMIOrderDetailsIter");
RowSetIterator s = dcIterBinding.getRowSetIterator();
System.out.println("Получено товаров " + data.size());
for (int i =0; i < data.size(); i++){
Row detailRow = (RowImpl)s.createRow();
detailRow.setNewRowState(Row.STATUS_INITIALIZED);
s.insertRow(detailRow);
s.setCurrentRow(detailRow);
// detailRow.setAttribute("lineNum",createLineNum(i));
detailRow.setAttribute("gtin",((PricatGoods)data.get(i)).getGtin());
detailRow.setAttribute("goodId",((PricatGoods)data.get(i)).getGoodId());
detailRow.setAttribute("goodName",((PricatGoods)data.get(i)).getGoodName());
detailRow.setAttribute("sellerarticle",((PricatGoods)data.get(i)).getGoodCode());
detailRow.setAttribute("buyerarticle",((PricatGoods)data.get(i)).getBuyerArticle());
detailRow.setAttribute("unit",((PricatGoods)data.get(i)).getUnit());
detailRow.setAttribute("totalQuantity",0);
detailRow.setAttribute("acceptedQuantity",0);
detailRow.setAttribute("taxRate",((PricatGoods)data.get(i)).getVatPercent());
detailRow.setAttribute("price",((PricatGoods)data.get(i)).getCost());
detailRow.setAttribute("priceWithoutTax",((PricatGoods)data.get(i)).getCostWithoutVat());
detailRow.setAttribute("sumWithoutTax",0.0);
detailRow.setAttribute("totalSum",0.0);
detailRow.setAttribute("currency",((PricatGoods)data.get(i)).getCurrency());
System.out.println("Добавление товара \" "+((PricatGoods)data.get(i)).getGoodName()+ "\" с goodCode " +((PricatGoods)data.get(i)).getGoodCode());
s.closeRowSetIterator();
AdfFacesContext.getCurrentInstance().addPartialTarget(table2);
Fields are update good where inputText.readOnly = true.
Fields are not update good where inputText.readOnly = false. Old data duplicate in new row.
I have found some posts, but in them is not told accurately as I can solve the given problem.
How to update a adf table??
Re: ADF Dialog FrameWork-Table Update Problem
Whether it is possible to solve the given problem?
Thx,
DemaIf I use outputText that all job's a good. But I don't change these fields. I should have field with change for users.
Code jspx page for table ===>
<af:table value="#{bindings.findVMIOrderDetails1.collectionModel}"
var="row"
rows="#{bindings.findVMIOrderDetails1.rangeSize}"
first="#{bindings.findVMIOrderDetails1.rangeStart}"
emptyText="#{bindings.findVMIOrderDetails1.viewable ? 'Товаров пока нет.' : 'Access Denied.'}"
selectionState="#{bindings.findVMIOrderDetails1.collectionModel.selectedRow}"
selectionListener="#{bindings.findVMIOrderDetails1.collectionModel.makeCurrent}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.table2}"
id="table2" styleClass="baseTable">
<af:column sortProperty="lineNum" sortable="false"
headerText="№"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column19}"
id="column19">
<af:inputText value="#{row.lineNum}" simple="false"
required="true"
columns="4"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText4}"
id="inputText4" readOnly="false"
requiredMessageDetail='Поле "№" обязательно для заполнения'/>
</af:column>
<af:column sortProperty="gtin" sortable="false"
headerText="GTIN"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column20}"
id="column20">
<af:inputText value="#{row.gtin}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.gtin.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.gtin.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText26}"
id="inputText26" readOnly="true"/>
</af:column>
<af:column sortProperty="sellerarticle" sortable="false"
headerText="Код товара у поставщика"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column21}"
id="column21">
<af:inputText value="#{row.sellerarticle}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.sellerarticle.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.sellerarticle.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText27}"
id="inputText27" readOnly="true"/>
</af:column>
<af:column sortProperty="buyerarticle" sortable="false"
headerText="Код товара у покупателя"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column22}"
id="column22">
<af:inputText value="#{row.buyerarticle}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.buyerarticle.mandatory}"
columns="10"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText28}"
id="inputText28" readOnly="true"
disabled="false"/>
</af:column>
<af:column sortProperty="goodName" sortable="false"
headerText="Наименование"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column23}"
id="column23">
<af:inputText value="#{row.goodName}" simple="true"
required="true"
columns="11"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText29}"
id="inputText29"
requiredMessageDetail="Поле обязательно для заполнения"
readOnly="true"/>
</af:column>
<af:column sortProperty="itemDesc" sortable="false"
headerText="Описание"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column24}"
id="column24" rendered="false">
<af:inputText value="#{row.itemDesc}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.itemDesc.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.itemDesc.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText30}"
id="inputText30"/>
</af:column>
<af:column sortProperty="unit" sortable="false"
headerText="Ед. изм."
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column25}"
id="column25">
<af:inputText value="#{row.unit}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.unit.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.unit.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText31}"
id="inputText31" readOnly="true"/>
</af:column>
<af:column sortProperty="currency" sortable="false"
headerText="Валюта"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column26}"
id="column26" rendered="false">
<af:inputText value="#{row.currency}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.currency.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.currency.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText32}"
id="inputText32"/>
</af:column>
<af:column sortProperty="totalQuantity" sortable="false"
headerText="Общее кол-во"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column27}"
id="column27">
<af:inputText value="#{row.totalQuantity}"
required="#{bindings.findVMIOrderDetails1.attrDefs.totalQuantity.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.totalQuantity.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText36}"
id="inputText36" readOnly="true">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.totalQuantity}"/>
</af:inputText>
</af:column>
<af:column sortProperty="acceptedQuantity" sortable="false"
headerText="Кол-во поставки"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column28}"
id="column28">
<af:inputText value="#{row.acceptedQuantity}"
required="true"
columns="7"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText37}"
id="inputText37"
requiredMessageDetail='Поле "Подтвержденное количество "обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.validatorQuantity}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.acceptedQuantity}"/>
</af:inputText>
</af:column>
<af:column sortProperty="taxRate" sortable="false"
headerText="НДС, %"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column29}"
id="column29">
<af:inputText value="#{row.taxRate}"
required="true"
columns="4"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText38}"
id="inputText38"
requiredMessageDetail='Поле "НДС" обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorNDS}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.taxRate}"/>
</af:inputText>
</af:column>
<af:column sortable="false" headerText="Цена"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column34}"
id="column34">
<af:column sortProperty="priceWithoutTax" sortable="false"
headerText="Без НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column31}"
id="column31">
<af:inputText value="#{row.priceWithoutTax}"
required="true"
columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText40}"
id="inputText40"
requiredMessageDetail='Поле "Цена без НДС" обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorPriceWithoutTax}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.priceWithoutTax}"/>
</af:inputText>
</af:column>
<af:column sortProperty="price" sortable="false"
headerText="С НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column30}"
id="column30">
<af:inputText value="#{row.price}"
required="true"
columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText39}"
id="inputText39"
requiredMessageDetail='Поле "Цена с НДС" обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorPrice}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.price}"/>
</af:inputText>
</af:column>
</af:column>
<af:column sortable="false" headerText="Сумма"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column35}"
id="column35">
<af:column sortProperty="sumWithoutTax" sortable="false"
headerText="Без НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column32}"
id="column32">
<af:inputText value="#{row.sumWithoutTax}"
required="true" columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText41}"
id="inputText41"
requiredMessageDetail='Поле "Сумма без НДС" обязательно для заполнения'
autoSubmit="true"
valueChangeListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.changeSum}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.sumWithoutTax}"/>
</af:inputText>
</af:column>
<af:column sortProperty="totalSum" sortable="false"
headerText="С НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column33}"
id="column33">
<af:inputText value="#{row.totalSum}" required="true"
columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText42}"
id="inputText42"
requiredMessageDetail='Поле "Сумма с НДС" обязательно для заполнения'
autoSubmit="true"
valueChangeListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.changeSum}"
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorTotalSum}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.totalSum}"/>
</af:inputText>
</af:column>
</af:column>
<f:facet name="selection">
<af:tableSelectOne text="Select and"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.tableSelectOne2}"
id="tableSelectOne2">
<af:commandLink text="Удалить"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink5}"
id="commandLink5"
action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.deleteRow}"
styleClass="tableControlButton"
immediate="false"/>
</af:tableSelectOne>
</f:facet>
<f:facet name="actions">
<h:panelGroup binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.panelGroup2}"
id="panelGroup2">
<af:commandLink text="Добавить"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink6}"
id="commandLink6"
styleClass="tableControlButton"
immediate="false"
action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.addRows}"
useWindow="true" windowHeight="500"
windowWidth="600"
returnListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.returnHandlerGoods}"
rendered="#{bindings.JdDoctype02rspType.inputValue == 9&&bindings.JdDoctype02orderrspId.inputValue==null}"/>
<af:commandLink text="Пересчитать" id="commandLink31"
styleClass="tableControlButton"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink31}"
action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.calc}"
useWindow="true" immediate="false">
<af:setActionListener from="#{row.rowKeyStr}"
to="#{processScope.mainRowKeyStr}"/>
</af:commandLink>
</h:panelGroup>
</f:facet>
</af:table> -
GL Posting using BAPI BAPI_ACC_DOCUMENT_POST but not updating in table BSEG
Hi Experts,
Hope all are doing greatu2026
I need you help to resolve the below issue.
We have on Z-Tcode to GL Posting the document using BAPI u2018BAPI_ACC_DOCUMENT_POST' and this program is successfully posted from the source file and documnet # also created successully.
We have entries in BKPF, but the table BSEG not updating and we do not have entries.
Please help me on this regards,
Thanks in Advance.
AmjadHi Srikant,
Thanks for your reply...
As you suggest, i have checked the structure ACCOUNTGL and below values are passing.
ACCOUNTGL -ITEMNO_ACC
ACCOUNTGL -GL_ACCOUNT
ACCOUNTGL- ITEM_TEXT
ACCOUNTGL- COMP_CODE
ACCOUNTGL- COSTCENTER
ACCOUNTGL- CS_TRANS_T
Could you please suggest me if there are any changes needs to do.
Thanks & Regards,
Amjad Hussain -
Planner group is not updated in service notification using BAPI
Hi,
Planner group is not updated in service notification using BAPI BAPI_ALM_ORDER_MAINTAIN.
I have written the below code, but planner group is not updated in the service notification.
Please advice which parameters do i need to pass to update planner group in the service notification.
wa_methods-refnumber = '000001'.
wa_methods-objecttype = 'PARTNER'.
wa_methods-method = 'CREATE'.
wa_methods-objectkey = wa_subscr1-aufnr.
APPEND wa_methods TO i_methods.
wa_methods-refnumber = '000002'.
wa_methods-objecttype = 'HEADER'.
wa_methods-method = 'CREATE'.
wa_methods-objectkey = wa_subscr1-aufnr.
APPEND wa_methods TO i_methods.
wa_methods-refnumber = '000000'.
wa_methods-objecttype = ' '.
wa_methods-method = 'SAVE'.
APPEND wa_methods TO i_methods.
REFRESH i_partner.
CLEAR wa_partner.
wa_partner-orderid = wa_subscr1-aufnr.
wa_partner-partn_role = 'VW'.
wa_partner-partn_role_old = ''.
wa_partner-partner = wa_subscr1-parnr.
wa_partner-partner_old = ''.
APPEND wa_partner TO i_partner.
REFRESH i_planrgrp.
CLEAR wa_planrgrp.
wa_planrgrp-orderid = wa_subscr1-aufnr.
wa_planrgrp-plangroup = wa_subscr1-ingpr.
APPEND wa_planrgrp TO i_planrgrp.
REFRESH i_planrgrp_up.
CLEAR wa_planrgrp_up.
wa_planrgrp_up-orderid = wa_subscr1-aufnr.
wa_planrgrp_up-plangroup = 'X'.
APPEND wa_planrgrp_up TO i_planrgrp_up.
*----Change order details with Technician name
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = i_methods
it_header = i_planrgrp
it_header_up = i_planrgrp_up
it_partner = i_partner
return = i_return.
Thanks & regards,
KrishnaTry this way
CALL FUNCTION 'BAPI_SERVNOT_CREATE'
EXPORTING
* EXTERNAL_NUMBER =
notif_type = 'S3'
notifheader = ls_notif_h
* TASK_DETERMINATION = ' '
* SENDER =
* ORDERID =
IMPORTING
NOTIFHEADER_EXPORT = ls_notif_e
TABLES
* NOTITEM =
* NOTIFCAUS =
* NOTIFACTV =
* NOTIFTASK =
* NOTIFPARTNR =
* LONGTEXTS =
* KEY_RELATIONSHIPS =
return = lt_return
* IF lt_return IS INITIAL. " <<< Comment this lie
read table lt_return into ls_return with key type = 'E'. " << Change
if sy-subrc ne 0. " << Change
COMMIT WORK AND WAIT.
write: / ls_notif_e-NOTIF_NO.
ELSE.
LOOP AT lt_return INTO ls_return.
WRITE:/ 'errors'.
* ls_return.
ENDLOOP.
endif.
a®
Maybe you are looking for
-
My LACIE hard drive shows up on some computers but not all.
Dear Apple Community I need your help, as I have searched around and can't find a solution to my peculiar problem. I have a 500gb LACIE Rugged hard drive product ID. RUG FWSA It has these connections: firewire 800, firewire 400, mini-usb, power I hav
-
SQL Server Reporting Services in SQL Server Express 2012
I installed SQL Server Express 2012 but cannot find SQL Server Reporting Services. Is it possible to use SSRS in SQL Server Express 2012? If possible, where do I get so that I could install it and make environment?
-
File upload fails when the file is larger than about 50kb. The upload returns a blank page when it fails. I have searched the world over and cannot find an answer to this problem. Does anyone have any suggestion of what to do? Thank you, Chris
-
Scheduler Jobs that run between certain times?
Is there an easy way to query which dbms_scheduler jobs run between any given times? If I look at repeat_interval in user_scheduler_jobs, for example, I've got things like "FREQ=DAILY; BYHOUR=14,16,18,20,8,10,12; BYMINUTE=30" and "FREQ=HOURLY; INTERV
-
Datafile was dropped or renamed?
Hi, suppose an OS admin dropped or renamed one datafile by accident(in UNIX). What is the quickest way to know this event happened? Thanks,