Update Z-Field in EKPO with BAPI_PO_CHANGE
Hello!
I need to update my field - called ZSERNR - in the table EKPO.
I found the FM BAPI_PO_CHANGE, but I do not know how it works.
I tried it so, but I just get the message (table RETURN), that no datas got changed.
I found some threads but I didn't understand them.
DATA: s_item TYPE bapimepoitem,
s_itemx TYPE bapimepoitemx,
i_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
i_extension TYPE bapiparex OCCURS 0 WITH HEADER LINE,
s_bapi_te_mepoitem TYPE bapi_te_mepoitem,
s_bapi_te_mepoitemx TYPE bapi_te_mepoitemx.
s_bapi_te_mepoitemx-po_item = ls_data_new-ebelp.
s_bapi_te_mepoitemx-zsernr = 'X'.
s_bapi_te_mepoitem-po_item = ls_data_new-ebelp.
s_bapi_te_mepoitem-zsernr = '123123'.
i_extension-structure = 'BAPI_TE_MEPOITEM'.
i_extension-valuepart1 = s_bapi_te_mepoitem.
APPEND i_extension.
i_extension-structure = 'BAPI_TE_MEPOITEMX'.
i_extension-valuepart1 = s_bapi_te_mepoitemx.
APPEND i_extension.
s_item-po_item = ls_data_new-ebeln.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = ls_data_new-ebeln
TABLES
return = i_return
extensionin = i_extension.
I hope somebody can help me.
Thx
Thank you for your fast answear
I didn't solved the problem till now, but I know that I can't use this FM in my BADI.
Because the table EKPO is locked at the time I am using the FM.
(BADI also writes into the table EKPO)
Similar Messages
-
Any way to update additional fields for SDLS with equipment at serial no cr
Dear all,
In the serializing procedure SDLS in the serial no profile
there is an option to create equipment alongwith serial no
creation. Currently it is updating only customer no into the
equipment master .
Is there any way to update additional fields into the equipment
master at the time of serial no capture ?
regards
MagiI think basically the answer is no, and even if you could I don't think it would help you much. A virtual machine error is exactly that, an error in the VM, not your code. The only thing I can suggest is that, if you want to see if your app is falling over in the same place every time, you use something like log4j.
-
How to insert/update Date field in Oracle with java code
Dear All
I have to insert/update a date column while creating a new item, but the problem is i am able to insert/update only date but i need both date and time along with AM/PM.
By using these 3 lines i am able to insert/update only date.
java.util.Date date = new java.util.Date();
long dateLong = date.getTime();
stmtPrep.setDate(33, new java.sql.Date(dateLong));
Below code retrives the date exactly what i need but unable to pass in the statement:
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss a");
java.util.Date d = (Date) new java.util.Date();
String stringdate = formatter.format(d);
String tmpdate = dateFormat();
stmtPrep.setString(33, tmpdate); -- I tried with setObject as well but same error coming.
Error is:
ORA-01830: date format picture ends before converting entire input string
Can u guide me how to get full date time with AM/PM?sasikrishna wrote:
Dear All
I have to insert/update a date column while creating a new item, but the problem is i am able to insert/update only date but i need both date and time along with AM/PM.
By using these 3 lines i am able to insert/update only date.
java.util.Date date = new java.util.Date();
long dateLong = date.getTime();
stmtPrep.setDate(33, new java.sql.Date(dateLong));That's by design. A java.sql.Date object matches an SQL DATE column (which doesn't include a time component). If you want something which matches an SQL TIMESTAMP colum (which includes both date and time components) then you should use a java.sql.Timestamp object. -
How to update delivered field in co03 with migo transaction?
We're doing a migo for a prod. order - though when looking into the CO03, the delivered quan is not updated.
prod order with control key PP05 (PO Auto GR for Exernal Pur.order), so it should be auto GR.
Any ideas?Hi,
Control key pp05 is for external purchase order. Have you given this control key in your routing.
Else check the control key used in your routing. For the last operation if it PP01(eg), then in t.code op67, choose pp01 & select auto GR. Now check after confirmation, Auto GR would have taken place.
Else you can maintain auto GR setting in production scheduling profile in t.code OPKP.
Regards,
Senthilkumar -
I Experts, I would like to update the field BANPR with 08 with a BAPI
Hi experts,
I would like to Update the field EBAN-BANPR with 08 (Release Refused). Is there any BAPI through which i can update this field and also it should raise the satandard events : REJECTED / REJECTION_STOP. I did check the BAPI : BAPI_PR_CHANGE, but this will not update that field.Please let me know if you have anything. Please help me.
Appreciate your help in this regards.
Many Thanks,
Prasad NN:I think you'll get a much better deal at the Apple online certified refurbished store. An ipad 2 64gb with cellular is there right now and costs $499.00 vs a new ipad 2 16gb with cellular which is $529.00. They also sell a 32 gb with cellular for $399.00 but only the 64gb is available now. With a refurb from anywhere else, you will not get what you will from the Apple refurb store.
Each Apple refurbished ipad (any version) comes with a new front and back cover, a brand new battery and a full one year warranty with 90 days of phone support. Each comes in a white box like a new ipad with the wall charger and usb cable. The only difference is that it says in small print on the bottom of the box that it is Apple certified refurbished. Also, if you buy refurb, be sure to check the store many times a day. They can come and go quickly, so when you see what you want, buy it right away. Shipping is free and pretty fast. (We bought two a year and a half ago and they have been great!)
This way you'll have cellular, all the room you need and then some and you'll save $30.00.
Let us know what you do and enjoy your new ipad!
Hope this helps. -
How to update ABSKZ field in the table EKPO
Hi
Is there any way to update the rejection indicator (ABSKZ) field of table EKPO?.
I am looking at BAPI_CHANGE_PO FM, But it does not have ABSKZ field in the item structure BAPIMEPOITEM.
Do I need to extend the BAPI structure with ABSKZ field ?
Regards
Raj.Hi
To extend BAPI_PO_CHANGE for EKPO-ABSKZ field , we have to add field in the structure BAPI_TE_MEPOITEM to pass it to EXTENSIONIN. As ABSKZ field already availble in the EKPO it is not allowed to add ABSKZ in the structure BAPI_TE_MEPOITEM. it is throwing below error message.
Field ABSKZ in table EKPO is specified twice. Please check
Since it is not Z field and also not availble in the structure BAPIMEPOITEM not sure how to update ABSKZ field in the EKPO table.
Please advice.
Regards
Raj -
HI,
I am trying to update the Subcontracting type of PO using 'BAPI_PO_CHANGE'. However i am able to update this field .
Can someone advice me how to do.
My code sample is :
wl_poitem-po_item = l_ebelp.
wl_poitemx-po_item = wl_poitem-po_item.
wl_poitemx-po_itemx = c_x.
*C--material procurement indicator need to update
* the type of procurement
wl_materialind-po_item = wl_poitem-po_item.
wl_materialindx-po_item = wl_poitem-po_item.
wl_materialindx-po_itemx = c_x.
wl_materialind-item_no = wl_poitem-po_item.
wl_materialindx-item_no = wl_poitem-po_item.
wl_materialindx-item_nox = c_x.
wl_materialind-mat_provision = 'S'.
wl_materialindx-mat_provision = c_x.
wl_materialind-sched_line = '0001'.
wl_materialindx-sched_line = '0001'.
wl_materialindx-sched_linex = c_x.
wl_materialind-entry_quantity = wl_poitem-quantity.
wl_materialindx-entry_quantity = c_x.
wl_materialind-plant = wl_poitem-plant.
wl_materialindx-plant = c_x.
wl_materialind-material = wl_poitem-material.
wl_materialindx-material = c_x.
wl_materialind-item_cat = 'L'.
wl_materialindx-item_cat = c_x.
wl_extensionin-structure = 'BAPI_TE_MEPOITEM'.
wl_extensioninx-structure = 'BAPI_TE_MEPOITEMX' .
wl_extensionin-valuepart1+222(1) = '1'.
wl_extensioninx-valuepart1+24(1) = c_x.
APPEND wl_poitem TO tl_poitem.
CLEAR wl_poitem.
APPEND wl_poitemx TO tl_poitemx.
CLEAR wl_poitemx.
APPEND wl_materialind TO tl_materialind.
CLEAR wl_materialind.
APPEND wl_materialindx TO tl_materialindx.
CLEAR wl_materialindx.
APPEND wl_extensionin TO tl_extensionin.
CLEAR wl_extensionin.
APPEND wl_extensioninx TO tl_extensioninx.
CLEAR wl_extensioninx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = l_ebeln
versions = wa_version
TABLES
return = tl_return
* poitem = tl_poitem
* poitemx = tl_poitemx
pocomponents = tl_materialind
pocomponentsx = tl_materialindx
extensionin = tl_extensionin
extensionout = tl_extensioninx.
READ TABLE tl_return WITH KEY type = 'E' TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
ENDIF.In the above question i mean- I am UNABLE to update
-
URGENT: Updating FISTL field using BAPI_PO_CHANGE
HI Friends,
I am about to update the field FISTL and GEBER in EKKN .
I am using BAPI_PO_CHANGE to update those fields . I have tried passing the fields to the table
POITEM and POACCOUNT in BAPI.
i have also given the values to POITEMX and POACCOUNTX tables .
I have given the BAPI_COMMIT_TRANSACTION also . i have given wait time also . Even then the value is not updated in EKKN table .
What could be reason for value not getting updated .
Is the table to which i am passing in BAPI is ok?
Please help me in this issue , its urgent.
Reward is sureHi Gokul,
Try 'BAPI_PO_CREATE1' and see if you can achieve the result.
*& Report YDM_PO_CREATE *
REPORT ydm_po_create.
*-- Input File Declaration
TYPES: BEGIN OF ty_input_file,
column1 TYPE char50,
column2 TYPE char50,
column3 TYPE char50,
column4 TYPE char50,
column5 TYPE char50,
column6 TYPE char50,
column7 TYPE char50,
column8 TYPE char50,
column9 TYPE char50,
column10 TYPE char50,
column11 TYPE char50,
column12 TYPE char50,
column13 TYPE char50,
column14 TYPE char50,
column15 TYPE char50,
column16 TYPE char50,
column17 TYPE char50,
column18 TYPE char50,
END OF ty_input_file.
DATA: i_input_file TYPE STANDARD TABLE OF ty_input_file,
wa_input_file TYPE ty_input_file.
CONSTANTS: c_path TYPE char20 VALUE 'C:\',
c_mask TYPE char9 VALUE ',*.*,*.*.',
c_mode TYPE char1 VALUE 'O',
c_filetype TYPE char10 VALUE 'ASC',
c_x TYPE char01 VALUE 'X'.
PARAMETERS : p_fname LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
*-- Browse Presentation Server
PERFORM f4_presentation_file.
START-OF-SELECTION..
*-- Read presentation server file
PERFORM f1003_upload_file.
IF NOT i_input_file[] IS INITIAL.
PERFORM split_data.
ENDIF.
*& Form f4_presentation_file
*& F4 Help for presentation server
FORM f4_presentation_file .
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = c_path
mask = c_mask
mode = c_mode
title = text-001
IMPORTING
filename = p_fname
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_presentation_file
*& Form f1003_upload_file
*& Upload File
FORM f1003_upload_file .
DATA: lcl_filename TYPE string.
lcl_filename = p_fname.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lcl_filename
filetype = c_filetype
has_field_separator = c_x
TABLES
data_tab = i_input_file
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
ENDFORM. " f1003_upload_file
*& Form split_data
Collect data for creating Purchase Order
FORM split_data .
DATA: i_poitem TYPE STANDARD TABLE OF bapimepoitem,
i_poitemx TYPE STANDARD TABLE OF bapimepoitemx,
i_poitem_sch TYPE STANDARD TABLE OF bapimeposchedule,
i_poitem_schx TYPE STANDARD TABLE OF bapimeposchedulx,
i_acct_*** TYPE STANDARD TABLE OF bapimepoaccount,
i_acct_assx TYPE STANDARD TABLE OF bapimepoaccountx,
i_services TYPE STANDARD TABLE OF bapiesllc ,
i_srvacc TYPE STANDARD TABLE OF bapiesklc,
i_return TYPE STANDARD TABLE OF bapiret2,
wa_header TYPE bapimepoheader,
wa_headerx TYPE bapimepoheaderx,
wa_poitem TYPE bapimepoitem,
wa_poitemx TYPE bapimepoitemx,
wa_poitem_sch TYPE bapimeposchedule,
wa_poitem_schx TYPE bapimeposchedulx,
wa_acct_*** TYPE bapimepoaccount,
wa_acct_assx TYPE bapimepoaccountx,
wa_services TYPE bapiesllc,
wa_srvacc TYPE bapiesklc,
wa_return TYPE bapiret2,
ws_po TYPE bapimepoheader-po_number.
break gbpra8.
wa_services-pckg_no = 10.
wa_services-line_no = 1.
wa_services-outl_no = '0'.
wa_services-outl_ind = c_x.
wa_services-subpckg_no = 20.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 10.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 01.
wa_srvacc-serial_no = 01.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
LOOP AT i_input_file INTO wa_input_file.
IF wa_input_file-column2 EQ 'HD'.
wa_header-doc_type = wa_input_file-column3.
wa_header-creat_date = sy-datum.
wa_header-created_by = sy-uname.
wa_header-vendor = wa_input_file-column4.
PERFORM conversion_output USING wa_header-vendor
CHANGING wa_header-vendor.
wa_header-comp_code = 'DE03'.
wa_header-purch_org = 'DE03'.
wa_header-pur_group = 'DE1'.
wa_header-vper_start = wa_input_file-column9.
wa_header-vper_end = wa_input_file-column10.
wa_headerx-comp_code = c_x.
wa_headerx-doc_type = c_x.
wa_headerx-creat_date = c_x.
wa_headerx-created_by = c_x.
wa_headerx-vendor = c_x.
wa_headerx-purch_org = c_x.
wa_headerx-pur_group = c_x.
wa_headerx-vper_start = c_x.
wa_headerx-vper_end = c_x.
ENDIF.
IF wa_input_file-column2 EQ 'IT'.
wa_poitem-po_item = wa_input_file-column3.
wa_poitem-short_text = wa_input_file-column6.
wa_poitem-plant = wa_input_file-column8.
wa_poitem-quantity = '1'.
wa_poitem-tax_code = 'V0'.
wa_poitem-item_cat = 'D'.
wa_poitem-acctasscat = 'K'.
wa_poitem-matl_group = wa_input_file-column7.
wa_poitem-pckg_no = '10'.
APPEND wa_poitem TO i_poitem .
wa_poitemx-po_item = wa_input_file-column3.
wa_poitemx-po_itemx = c_x.
wa_poitemx-short_text = c_x.
wa_poitemx-plant = c_x.
wa_poitemx-quantity = c_x.
wa_poitemx-tax_code = c_x.
wa_poitemx-item_cat = c_x.
wa_poitemx-acctasscat = c_x.
wa_poitemx-matl_group = c_x.
wa_poitemx-pckg_no = c_x.
APPEND wa_poitemx TO i_poitemx.
wa_poitem_sch-po_item = wa_input_file-column3.
wa_poitem_sch-delivery_date = sy-datum.
APPEND wa_poitem_sch TO i_poitem_sch.
wa_poitem_schx-po_item = wa_input_file-column3.
wa_poitem_schx-po_itemx = c_x.
wa_poitem_schx-delivery_date = c_x.
APPEND wa_poitem_schx TO i_poitem_schx.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 01.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_***-po_item = 10.
wa_acct_***-serial_no = 02.
wa_acct_***-gl_account = '0006360100'.
wa_acct_***-co_area = '1000'.
wa_acct_***-costcenter = 'KC010000'.
APPEND wa_acct_*** TO i_acct_***.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 01.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_acct_assx-po_item = 10.
wa_acct_assx-serial_no = 02.
wa_acct_assx-po_itemx = c_x.
wa_acct_assx-serial_nox = c_x.
wa_acct_assx-gl_account = c_x.
wa_acct_assx-co_area = c_x.
wa_acct_assx-costcenter = c_x.
APPEND wa_acct_assx TO i_acct_assx.
wa_services-pckg_no = 20.
wa_services-line_no = 2.
wa_services-service = wa_input_file-column9.
wa_services-quantity = '100'.
wa_services-gr_price = '100'.
wa_services-userf1_txt = wa_input_file-column13.
APPEND wa_services TO i_services.
wa_srvacc-pckg_no = 20.
wa_srvacc-line_no = 1.
wa_srvacc-serno_line = 02.
wa_srvacc-serial_no = 02.
wa_srvacc-percentage = 100.
APPEND wa_srvacc TO i_srvacc.
ENDIF.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_header
poheaderx = wa_headerx
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS =
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
exppurchaseorder = ws_po
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
return = i_return
poitem = i_poitem
poitemx = i_poitemx
POADDRDELIVERY =
poschedule = i_poitem_sch
poschedulex = i_poitem_schx
poaccount = i_acct_***
POACCOUNTPROFITSEGMENT =
poaccountx = i_acct_assx
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
poservices = i_services
posrvaccessvalues = i_srvacc
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
break gbpra8.
LOOP AT i_return INTO wa_return.
ENDLOOP.
ENDFORM. " split_data
*& Form conversion_output
Conversion exit input
FORM conversion_output USING p_ip
CHANGING p_op.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_ip
IMPORTING
output = p_op.
ENDFORM. " conversion_output
<b>Reward points if this helps.
Manish</b> -
Error using Bapi_PO_Change for update custom fields
Dear Expert,
I have requirement for update custom field in table ekko. I used BAPI_PO_CHANGE with PO_number as a key. Then i put the value of custom field in segment TABLES - EXTENSIONIN.
But I get error : "ERROR TRANSFERING EXTENSIONIN DATA FOR ENHANCEMENT CI_EKKODB".
When I checked, I found the difference between data type the value for BAPI_PO_CHANGE (Usinf structure BAPIPAREX) and data type for custom field in table EKKO.
Data Type in BAPI_PO_CHANGE is CHAR (you can see in structure BAPIPAREX). And data type for the custom field is DECIMAL.
I found the note '1124803', but the correction note was not applicable for us because our released system is 500.
Is there any suggestion or solution for resolve our problem?
Really appreciate your help.
Thanks.Hi Laxmikanth Bethi ,
I tried with BAPI_PO_CHANGE in level header, and SAP was support the BAPI. And also i tried to appending the same fields in MEPOHEADR & MEPOHEADERX structures, but the problem is the type of my custom fields are DECIMAL, then the type MEPOHEADR & MEPOHEADERX structures are CHARACTER. So i got the error : "ERROR TRANSFERING EXTENSIONIN DATA FOR ENHANCEMENT CI_EKKODB".
Because the types are difference.
Have you any suggestion to solve this problem?
Really appreciate for your input. -
Problem with Update Text fields in Infoset
Hi experts,
Here i would like to rephrase the question. Normaly while working with Infosets, when press "update text fields" button, those fields having text is updated. But one of my field is not updated. I need some help from you for that.
One more question i've that my field is having check table so i would like to know how exactly the text field is updated.
scenario.
Customized IT9320 has field prt_pos added. This field is having check table T528B. But i want text field to be attached is IT1000-STEXT.
How this can be done, because i suspect that just using check table field IT1000-STEXT is not attached to IT9320-prt_pos.
Please help. I'm really got stuck here.
Thanks a lot,
Toral.
Hi,
I'm working on customised Infotype. I need to add one new customised field ie Present Position. This field has number as well as text associated with it. There is a check table attached with this field so that text can be displayed alongwith number.
I need this field in SAP/Adhoc query. But when i go to SQ02 this fields shows only value. Text is disabled for this field. I'm not sure why is it so.
I looked into other infotype which as one field using same data element, and that field shows both value as well as text. Please help me to rectify this issue for present position field.
Thanks,
Toral.
Edited by: Toral Sheth on Jul 4, 2008 2:01 PMYou would be much better off with one multi-line form field.
There are many problems with trying to determine when one is at the end of the display field with text entry. -
Updating field ELIKZ EKPO on a CONTRACT(me33k) - how ?
I am updating field ELIKZ EKPO on a CONTRACT(me33k) using BAPI: BAPI_CONTRACT_CHANGE in my report program.
This BAPi give a message 'Change ELIKZ could not be effected'
MEssage ID of this message is I ME 664.
So, Is there any otherbapi or other solution to update this field.
Your help is highly appreciated.
Thanks in ADV.Basically this is specific to AFS contract.
My requirement is : When I check the 'AFS Contract close' in tcode ME32K and press 'save' button, it updates table fields ekpo-elikz & eket-j_3acci(though ME23K does other things...my requirement is to check ekpo-elikz & eket-j_3acci get updated ).
I need to do the above using my report program.
1). So inorder to achive the above, I am calling a BAPI : BAPI_CONTRACT_CHANGE in which I am setting item-no_more_del = 'X' for the contract number.
However, the field 'AFS Contract close' is specific to AFS, this BAPI_CONTRACT_CHANGE bapi does not work. It only updates ekpo-elikz and but not eket-j_3acci. So my question is BAPI_CONTRACT_CHANGE is the solution for this ?
2). Is there any other way to achieve the above using my program other than BDC ?
Your help will be highly appreciated.
Thanks in advance -
Help with centrally locating a script so it updates all fields?
Hello,
At work we use a form I built that shows were each employee in assigned for the day. We have some part-time personal and I've made it so that they show up in red where all normal employee's show up as black. This works great, my issue is when a new employee is hired or a part-time goes full time I am having to go into each individual field and change this script. There is 60 fields total so as you would imagine this takes a lot of time to update just one employee. Below is a sample of the script I am using to designate if the name should be black (full-time) or red (part-time).
Is there a way that I can point all fields to one location? Then I would only have to update one field and it fix them all??
if (event.value=="BRACKETT" || event.value=="Deleted" ||
event.value=="P. BOWMAN" ||
event.value=="TALLENT" ||
event.value=="EDWARDS" ||
event.value=="MEJIA" ||event.value=="ROGERS" ||event.value=="LASKEY" ||
event.value=="HOUSER" ||
event.value=="BROOKS" ||
event.value=="GORDON") event.target.textColor = color.red;
else event.target.textColor = color.black;
Thank-you so much,
DavidOK, remove all of the code from the document JavaScript and replace it with the code shown below. When you need to update the names in the dropdowns, set up a button and use the following as its Mouse Up script:
// Mouse Up script for a button
updateDropdowns();
You can hide the button and unhide it whenever you need to update, and then hide it again. You can also run that line of code from the interactive JavaScript console, but a button is a bit easier.
This way, you just have to add names and what color you want for each by editing the oEmpNames object code. When you're done editing the list of names, run the updateDropdowns routine and all of the dropdowns will be updated with the new list.
// All if the code below goes in a document JavaScript
// Create an object to associate an employee name with text color to user when selected in a dropdown
var oEmpNames = {
"George Washington" : color.black,
"Thomas Jefferson" : color.red,
"Abraham Lincoln" : color.black,
"Teddy Roosevelt" : color.black,
"John Kennedy" : color.red,
"Ronald Reagan" : color.black
// Validate script for dropdowns
function validateEmpName() {
event.target.textColor = oEmpNames[event.value];
// Function to update dropdowns with list of employee names
function updateDropdowns() {
// Create an array of names to populate the dropdown items
var aItems = [];
for (var name in oEmpNames) {
aItems.push(name);
// Loop through the dropdowns and populate them with names in the array
for (var i = 0; i < aDropdowns.length; i += 1) {
getField(aDropdowns[i]).setItems(aItems);
// Create an array of dropdown names
var aDropdowns = [
"Dropdown1",
"Dropdown4922",
"Dropdown4923",
"Dropdown4924",
"Dropdown490",
"Dropdown482",
"Dropdown470",
"Dropdown4600",
"Dropdown491",
"Dropdown480",
"Dropdown471",
"Dropdown461",
"Dropdown492",
"Dropdown481",
"Dropdown472",
"Dropdown4620",
"Dropdown493",
"Dropdown483",
"Dropdown473",
"Dropdown463",
"Dropdown494",
"Dropdown48",
"Dropdown47",
"Dropdown460",
"Dropdown47011",
"Dropdown46011",
"Dropdown47211",
"Dropdown4621",
"Dropdown47311",
"Dropdown46311",
"Dropdown2",
"Dropdown4",
"Dropdown5",
"Dropdown11",
"Dropdown4925",
"Dropdown4926",
"Dropdown4927",
"Dropdown4901",
"Dropdown4821",
"Dropdown4701",
"Dropdown4601",
"Dropdown4911",
"Dropdown4801",
"Dropdown4711",
"Dropdown4611",
"Dropdown4921",
"Dropdown4811",
"Dropdown4721",
"Dropdown462",
"Dropdown4931",
"Dropdown4831",
"Dropdown4731",
"Dropdown4631",
"Dropdown4941",
"Dropdown4813",
"Dropdown4712",
"Dropdown46",
"Dropdown47019",
"Dropdown460116",
"Dropdown472129",
"Dropdown462186",
"Dropdown473115",
"Dropdown463158" -
Update OIM field with process form fields
Hi,
I have configured AD as a target resource to my OIM. Now i have a requirement to update few fields of OIM , on the basis of change in the fields of process form when target recon will run. For this, as per my understanding i can use the post insert/post update adapter. I wrote the adapter code as well. But when now i am running the recon against my resource, and updating the field, it couldn't even run the adapter as nothing has been written in logs (not even the println statements mentioned in adapter code :( ). Could anyone please tell me where i am missing.Hi,
I did create a task and assign it on "Event Processed" (Response) under reconciliation insert recieved and reconciliation update recieved. Now when i tried to run recon it is giving me error while processing the recon event. Error is "An error occured while processing the off lined reconciliation event. [xellerate.jms] processing reconciliation message with id <recon event id> failed" . Am i missing something.... Please help
TIA -
Problem with updating email fields thru ADRMAS idoc
Hi
I have a ABAP program which calls the function module to create a vendor -ERP_IDOC_INPUT_CREDITOR'.
During the creation of the vendor i can update the adress and telephone numbers but i cant input the email address .
To solve this i am calling the function module (BAPI_IDOC_INPUT1-function module used in ADRMAS idoc).
When i run the idoc it updates the field but when i call the Bapi in the abap program it does not update the data that i have entered in the function module .
I tried doing a BAPI_TRANSACTION_COMMIT but it still does not update it.
Any suggestions to solve it.
Also at the end of submitting the idoc it gives me a message
BAPI SAVEREPLICA has been called successfully
Is that what adrmas should be giving .
ThanksHi ,
Check your BAPI Returen Parameters, if it successfull then goto ADRC,ADR2,ADR6 tables and check your entry...
email address in ADR6 table -
Doubt on updating PROJN field in EKKN
Hi Friends,
I have a requirement to update the PROJN(old pos number) field in EKKN table with some shipment date from input file.
i have checked with BAPI_PO_CHANGE for updation.
I cannot accurately find a specific field where i need to update for PROJN in that BAPI.
Actually the PROJN field is not in use now.
Can anybody help me with which field in ME22N denotes the PROJN field.
Is there any ways to update an non-existing field with some other field.
<b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada GalindoAs the field is no longer used I doubt if there is a bapi or other object that allows you to update the field. Even if there was a bapi then support for updating that field could be withdrawn in the future. To be safe you should look at using another field. If you get replies telling you to directly update ekkn-projn then ignore them, thats silly.
Maybe you are looking for
-
Error when installing Quicktime 7.1.3
I'm having trouble updating my iTunes/QuickTime to the newest version. The error I get is: Could not open key: HKEYLOCALMACHINE\Software\Classes\QuickTimePlayerLib.QuickTimePlayerApp\CLSID. Verify that you have sufficient access to that key, or conta
-
Escape character for apostrophe ' in JDBC receiver channel
Hi all, We have Proxy to JDBC scenario in our project. This interface is working fine with unicode data but when there is an apostrophe( ' ) coming in any of the field values ( ex: DOWTHERM 'J' MODEL19QAGB1G ) , the message is failing in receiver JDB
-
Hi, We want to convert some LIS-reports, like "dead stock" and "Inventory turnover" to a BW report. I have activated InfoCube 0IC_C03. Does anybody have experience to create a "Dead stock" report in BW(Dead stock is the part of your warehouse stock t
-
Warranty period end date is not displayed in t.code -wty
Hi all, I am creating warranty claim for a particular dealer. I have entered equipment number in t.code-wty. I have already maintained master warranty for this equipment number. Now system is not checking the validity period for a particular equipmen
-
What is program Bonjour?
It appears on my list of Programs under Windows XP as an Apple program. But there is no explanation on the Apple website, as referenced in the description within the program entry. I was considering un-installing it, as part of a cleanup of my PC,