Function module to update the values in STPO table : VERY URGENT!!!!!!!!!
Hi All,
Can any one tell me is there any Remote function module to update the values of components in STPO table while creating Sales order BOM, Material BOM, and WBS BOM. For example I want to update the Spare Part Indicator for Item components based on Plant.
Please do the needful..
Regards
Yathish
For material bom: CSAP_MAT_BOM_CREATE
and CSAP_ORD_BOM_CREATE for Order BOM.
Regards,
Ravi
Similar Messages
-
Hi All,
Can any one tell me is there any Remote function module to update the values of components in STPO table while creating Sales order BOM, Material BOM, and WBS BOM. For example I want to update the Spare Part Indicator for Item components based on Plant.
Please do the needful..
Regards
YathishHi Naren,
Thanks for ur reply,
The BAPI that you have gave is to update only Material BOM. But I want to Change and create spare part indicator for 4 BOM's, ie Sales Order BOM, Eqipment BOM and also Material BOM and WBS BOM.
Can u please shed some light on it,so that it would be helpfull to me.
Thanks
Yathish -
Function module for updating the values in table VTTK
Hi,
I am working on a report in which I need to update the value of field tdlnr of table vttk for a particular shipment number. I need to do this using functional module and I am not been able to find one. If anyone knows answer to this plz help.
Thanks in advance,
Priyanka.As noted above, RETURN table must be supplied empty, it is for BAPI to return the messages back to the calling program. You simply need to define an internal table, pass it to BAPI as is and then analyze this table after the BAPI call. For example:
DATA: BEGIN OF it_return OCCURS 0.
INCLUDE STRUCTURE bapiret2.
DATA: END OF it_return.
CALL FUNCTION 'BAPI_SHIPMENT_CHANGE'
<...>
TABLES
<...>
return = it_return.
LOOP AT it_return.
MESSAGE
ID it_return-id
TYPE it_return-type
NUMBER it_return-number
WITH
it_return-message_v1
it_return-message_v2
it_return-message_v3
it_return-message_v4.
ENDLOOP.
Hope this helps. -
Creation of function module for updating the ztable
Hi,
I am sending the requirement for ceation of function module for updating the ztable.
Requirement----
Table Updation rule (New record)
While creating a new record the calling function will export the following to the table handling function.
Table field Probable Values
ZORDERNO-------> Sales Delivery no in case of sales orderShipment no in case of transfer order
UNAME----
> User ID
ZORDTYPE----
> SALEOR in case of sales orderTRANSF in case of transfer order
ZREFDOCNO----
>Sales Order no in case of sales orderPurchase Order no in case of transfer order
ZREFDOCNO1----
>Delivery no in case of transfer order
The table handling function will calculate the following fields
Table field Probable Values
ZREQNO----
>Running serial number (incremented by 1 for each new record)
ZREQDAT -
>System date
ZREQTIME----
> System time
ZSTATUS----
>OPEN (for all new records)
Before inserting a new record the table handling function will always check if a previous record exists for the same order / shipment no. if record exists the function will not insert a new record.
Table Updation rule (Status Update)
While updating a record the calling function will export the following to the table handling function.
Table field Probable Values
ZORDERNO----
>Sales order no in case of sales orderShipment no in case of transfer order
ZSTATUS----
>CANCEL if cancellation successfulERROR if cancellation not possible (order already processed)
The table handling function will calculate the following fields
Table field Probable Values
ZSTATDAT----
>System date
ZSTATTIME----
> System timeDo you have to create/update new record in Ztable through Function Module ?
or you need to write FM only for validation?
Any how, you need to create a Program with Input values for the fields of Ztable, and for rest of fields the Value can be calculated based on input as per your requirement.
Let me know clearly what exactly u need ?
Regards,
Kiran -
CRM function module to update the attribute in the classification TAB of BP
Hi All,
Can any body let me know if there is any functionmodule to update the CRM function module to update the attribute in the classification TAB of BP tcode.
I have searched a lot i get FM to update the marketing attribute and not the attributes in the classification tab.
Thanks in Advance
Edited by: Sharath Kumar on Dec 2, 2010 4:48 PMFor material bom: CSAP_MAT_BOM_CREATE
and CSAP_ORD_BOM_CREATE for Order BOM.
Regards,
Ravi -
Function Module to update the FI and Logistics Invoice
Hi All,
Is there any function module which updates the FI and Logistics Invoice simultaneously?
Regards,
Adapala MFor material bom: CSAP_MAT_BOM_CREATE
and CSAP_ORD_BOM_CREATE for Order BOM.
Regards,
Ravi -
Function Module to update the sales order header status
Hi,
I am looking for a function module to update the Sales order header status.
Pls. let me know if anybody has used any FM to update the SO status.
Thanks,By mentioning status do you mean Object status or Document status??
For Object status you may use FM: STATUS_MAINTAIN
For document status it changes according to flow.
Regards
Eswar -
Bapi or function module to update rstgr field in bseg table
what is the bapi or function module used to update the fields in bseg table particularly "rstgr" field?
Hi,
Use Bapi
BAPI_ACC_DOCUMENT_POST
Regards,
Prashant -
What is the Function MOdule that returns the fields in database table order
Hello Folks
I have a dynamic internal table with fields ( which are not in order). I want to display them in the order of which they are present in the database table? Is there any function module that returns the fields in database order?
FAQ. Please search before posting your question.
Edited by: Suhas Saha on Oct 10, 2011 10:19 PMHi,
You can use this BAPI.
<b>BAPI_SALESORDER_GETLIST</b>
Reward if useful.
Regards,
Vimal -
Function module to find the columns in Internal table
Hi Group,
Is there any function module which displays the columns of the internal table. I guess there is one cos when we debug any program and select the "Tables" button while debugging and enter an internal table and then do a "Find" the pop up which comes up shows the internal table columns. As this functionality is in the debugger which I cannot debug hence was wondering if some one has come across any such function module. Thanks in advance.
Regards,
Ankur Bhandari
[email protected]Hi again,
1. In the above FM
Pass Program as SY-REPID (U cann pass other prg name also)
in FieldName Pass the name of the internal table
eg. 'ITAB'
2. This FM will give u the details of the
internal table.
The u can display the COMPONENTS table
using ALV or anyother method u like.
Regards,
Amit M. -
Api to update the values in per_periods_of_placement table
Hi,
can anyone let me know whether any hrms api is available to update the values in the table PER_PERIODS_OF_PLACEMENT.
I want to update the values under the column TERMINATION_REASON in per_periods_of_placement for few set of contingent workers(for those a wrong reason was entered need to replace with correct value now).
Please revert asap.
Thanks,
JithendraHere is my stand alone PL/SQL block :
I am supplying the start_date fro mthe per_periods_of_ placement table itself...
DECLARE
CURSOR get_cwk_details IS
SELECT person_id cwk_person_id,
object_version_number ovn,
date_start service_start_date
FROM per_periods_of_placement pdp, hr_lookups l
WHERE l.lookup_type(+) = 'HR_CWK_TERMINATION_REASONS'
AND l.lookup_code(+) = pdp.termination_reason
AND HR_GENERAL.DECODE_LOOKUP ('HR_CWK_TERMINATION_REASONS',
PDP.TERMINATION_REASON) = 'Deceased' ;
l_person_id NUMBER(20);
l_ovn NUMBER(10);
l_date_start DATE;
BEGIN
FOR get_cwk_details_rec in get_cwk_details
LOOP
l_person_id := 153564;--get_cwk_details_rec.cwk_person_id;
l_ovn := get_cwk_details_rec.ovn;
l_date_start := get_cwk_details_rec.service_start_date;
dbms_output.put_line('l_person_id = ' || l_person_id);
dbms_output.put_line('l_ovn = ' || l_ovn);
dbms_output.put_line(' l_date_start = ' || l_date_start);
apps. hr_periods_of_placement_api.update_pdp_details(
P_VALIDATE => FALSE,
P_EFFECTIVE_DATE => l_date_start,
P_OBJECT_VERSION_NUMBER => l_ovn,
P_PERSON_ID => l_person_id,
P_DATE_START => l_date_start,
P_TERMINATION_REASON => 'DW');
COMMIT;
END LOOP;
END; -
Function Module to update the file path/name into Infopackage
Hi Experts,
I have some flat files which will be loaded to the directly daily. My requirement is to update the file name into the infopackage dynamically. Please suggest any function module or program for it.
Thanks,
KittuIn Higher versions, we can use the below code:
call method CL_GUI_FRONTEND_SERVICES=>ENVIRONMENT_GET_VARIABLE
exporting
VARIABLE = 'TEMP'
importing
VALUE = LV_TMP
exceptions
CNTL_ERROR = 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.
call method CL_GUI_CFW=>FLUSH
exceptions
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
others = 3.
if SY-SUBRC <> 0.
Error handling
endif.
concatenate lv_tmp '\' into folder_path.
But need to know in the lower versions like 3.1h and 4.0, -
Function Module to update Characteristic Value (AUSP table entry)
Looking for a function module/BAPI to update a characteristic value (AUSP table entry).
This is for a material master Material classification value, not a Variant Config value that I need to update.
Anybody have one? I have one that will find the value, but not change it.
Thanks.That wasn't it, but it gave me the one piece I was missing.
Answer is:
Function Module "CLAE_CLASSIFY_OBJECT"
In CHANGE_KSSK
M = 0
KLA = (Class Type)
OBJEK = (Material Number for the Material Characteristic being changed)
OBTAB = MARA
CLASS = (Class Name with Characteristic to be changed)
S = 1
S = (blank)
AENNR = (EC Change Number or Blank)
DATUV = (Today's Date or date for change)
C = "X"
In CHANGE_AUSP
OBJEK = (Material Number for the Material Characteristic being changed)
ATINN = (Chararacteristic to be changed)
M = 0
KLA = (Class Type)
ATWRT = (New Value for Characteristic)
C = X -
Function module to change the value for pricing condition type
Hello experts,
I want to change the value for pricing condition type for an item in the transaction CRMD_ORDER.
I used many function modules but none are working.
Please kindly suggest a function module that will change the value for a condition type .
I have used the following function module but its not working, please correct the coding if anything needs to be changed or added. Please help me .
Thank you.
CLEAR PRCD_COND.
SELECT SINGLE * FROM PRCD_COND WHERE KPOSN = WA_ORDERADM_I-GUID AND
KSCHL = COND_TY.
IF SY-SUBRC = 0.
* MOVE-CORRESPONDING PRCD_COND TO L_COND_CHG.
* CLEAR L_COND_CHG-KBETR.
L_COND_CHG-STUNR = PRCD_COND-STUNR.
L_COND_CHG-KBETR = COND_PRC.
* L_COND_CHG-KSCHL = COND_TY.
INSERT L_COND_CHG INTO TABLE T_COND_CHG.
L_HEAD_GUID = CRMD_ORDERADM_H-GUID.
L_ITEM_GUID = WA_ORDERADM_I-GUID.
INSERT L_HEAD_GUID INTO TABLE HEAD_GUID.
INSERT L_ITEM_GUID INTO TABLE ITEM_GUID.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
IT_HEADER_GUID = HEAD_GUID
IT_ITEM_GUID = ITEM_GUID
IMPORTING
ET_ORDERADM_H = LT_ORDERADM_H
ET_ORDERADM_I = LT_ORDERADM_I
ET_PRIDOC = IT_PRIDOC_RD
ET_DOC_FLOW = T_DOC_FLOW
* CHANGING
* CV_LOG_HANDLE =
* EXCEPTIONS
* DOCUMENT_NOT_FOUND = 1
* ERROR_OCCURRED = 2
* DOCUMENT_LOCKED = 3
* NO_CHANGE_AUTHORITY = 4
* NO_DISPLAY_AUTHORITY = 5
* NO_CHANGE_ALLOWED = 6
* OTHERS = 7
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
MOVE-CORRESPONDING LS_PRIDOC_RD TO L_PRI_COND.
INSERT L_PRI_COND INTO TABLE PRI_COND.
LOOP AT IT_PRIDOC_RD INTO LS_PRIDOC_RD.
MOVE-CORRESPONDING LS_PRIDOC_RD TO L_PRIDOC_CHG.
L_PRIDOC_CHG-PRIC_COND = PRI_COND.
L_PRIDOC_CHG-REF_GUID = LS_PRIDOC_RD-GUID.
L_PRIDOC_CHG-COND_CHANGE = T_COND_CHG.
INSERT L_PRIDOC_CHG INTO TABLE PRIDOC_CHG.
ENDLOOP.
LOOP AT LT_ORDERADM_H INTO LS_ORDERADM_H .
MOVE-CORRESPONDING LS_ORDERADM_H TO L_HEADER.
INSERT L_HEADER INTO TABLE HEADER.
ENDLOOP.
LOOP AT LT_ORDERADM_I INTO LS_ORDERADM_I.
MOVE-CORRESPONDING LS_ORDERADM_I TO L_ITEM.
INSERT L_ITEM INTO TABLE ITEM.
ENDLOOP.
L_FIELD-FIELDNAME = 'STUNR'.
INSERT L_FIELD INTO TABLE FIELD.
L_FIELD-FIELDNAME = 'KBETR'.
L_FIELD-CHANGEABLE = 'X'.
INSERT L_FIELD INTO TABLE FIELD.
L_INPUT-FIELD_NAMES = FIELD.
L_INPUT-REF_KIND = 'E'.
L_INPUT-REF_GUID = LS_PRIDOC_RD-GUID.
L_INPUT-OBJECTNAME = 'PRIDOC'.
INSERT L_INPUT INTO TABLE INPUT.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
IT_PRIDOC = PRIDOC_CHG
IMPORTING
ET_EXCEPTION = EXCEPT
CHANGING
CT_INPUT_FIELDS = INPUT.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH EXCEPT.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
IT_OBJECTS_TO_SAVE = HEAD_GUID
* IV_UPDATE_TASK_LOCAL = FALSE
* IV_SAVE_FRAME_LOG = FALSE
* IV_NO_BDOC_SEND = FALSE
* IT_ACTIVE_SWITCH =
IMPORTING
ET_SAVED_OBJECTS = SAVED
ET_EXCEPTION = EXCEPT
ET_OBJECTS_NOT_SAVED = UNSAVED
* CHANGING
* CV_LOG_HANDLE =
* EXCEPTIONS
* DOCUMENT_NOT_SAVED = 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.
COMMIT WORK AND WAIT.Hi,,
To be able to call a function module in an update work process, you must flag it in the Function Builder. When you create the function module, set the Process Type attribute to Update with immediate start
Alternatively u can use this function module.
CRM_STATUS_DATA_SAVE_DB
BAPI_CUSTOMERCRM_CHANGE (If u wish to use a bapi for this).
Also , Let me know what error you got when implementing other function module.Does the function module didnt return any error but still the value is not changed for pricing condition type? -
Function module to update the classification of each of the devices 'IQ02'
Can any one please tell me if there is any Function module or BAPI that can be used to update the device classification details. I am referring to the classification details that are updated for each of the device serial numbers using Transaction 'IQ02'
Please see the following code
log initialization
CALL FUNCTION 'BAPI_LOG_INIT'.
do some initializations
CLEAR db_update.
create classification data
CALL FUNCTION 'CACL_OBJECT_ALLOCATION_MAINT'
EXPORTING
object_type = x_auto-header-object_type
class = x_auto-header-class
class_type = x_auto-header-class_type
STATUS =
STANDARD_CLASS =
DELETE_ALLOCATION =
CHANGE_NO =
I_OBJ_NOT_CHK = ' '
I_DATUV =
I_NO_DEFAULTS = ' '
TABLES
object_identification = x_auto-data
EXCEPTIONS
error = 1
warning = 2
OTHERS = 3.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_LOG_CLOSE'
TABLES
return = lt_return.
LOOP AT lt_return INTO wa_return WHERE type = 'E'.
mac_msg_putx co_msg_error wa_return-number
wa_return-id
wa_return-message_v1
wa_return-message_v2
wa_return-message_v3
wa_return-message_v4
space.
ENDLOOP.
RAISE input_error.
ENDIF.
* transfer validation data
CALL FUNCTION 'CACL_OBJECT_VALIDATION_MAINT'
EXPORTING
object_type = x_auto-header-object_type
class = x_auto-header-class
class_type = x_auto-header-class_type
CHANGE_NO =
I_OBJ_NOT_CHK = ' '
I_DATUV =
I_NO_DEFAULTS = ' '
TABLES
object_identification = x_auto-data
validation_maint = x_auto-value
EXCEPTIONS
error = 1
warning = 2
OTHERS = 3.
IF sy-subrc <> 0.
CALL FUNCTION 'BAPI_LOG_CLOSE'
TABLES
return = lt_return.
LOOP AT lt_return INTO wa_return WHERE type = 'E'.
mac_msg_putx co_msg_error wa_return-number
wa_return-id
wa_return-message_v1
wa_return-message_v2
wa_return-message_v3
wa_return-message_v4
space.
ENDLOOP.
RAISE input_error.
ENDIF.
* transfer to data base without commit
CALL FUNCTION 'CACL_CLASSIFICATION_SAVE'
EXPORTING
i_commit = ' '
i_no_upd_task = 'X'.
close internal log
CALL FUNCTION 'BAPI_LOG_CLOSE'
TABLES
return = lt_return.
set update flag if everything went well
db_update = 'X'.
Maybe you are looking for
-
Comparing 2 segments based on the same data
Hi All, I'm using OBIEE 11g and Oracle database. I'm writing a report that compares several measures in 2 populations based on several dimensions (conditions). I tried using prompts, different presentation variables for population 1 and population 2
-
Hi,<br> <br> I order to use the few features of PLM7.0 I started to setup a TREX-Server.<br> <br> But when I create an Index for an Business Object,<br> (using Transaktion SES_ADMIN -> Index -> create Index/activate Index -><br> select an Business O
-
? about transferring Intel iMac to new Intel iMac
I'm considering a new iMac and am trying to find out if there is a way to duplicate my old drive onto the new drive (instead of using "migration assistant"). Can I create a full disk image of the old computer, then somehow transfer it to the new one?
-
Hello! Does anyone knows if its possible to change a US keyboard of a macbook pro for a portuguese keyboard. And how much it is approximatedlly. Thanks
-
Uninstalling Leopard / erasing harddrive
We installed Leopard and then realized we didn't meet the system requirements for RAM. There's been a ton of problems-so we're trying to un-install Leopard and we attempted to erase our computer's harddrive using: disk utility - erase - erase free sp