Function module to update operation assignment for a BOM Item
Hi Group,
we have a requirement as under:
Goto BOM Change using CS02->select any BOM item and click the Menu path->Extras->Operation Assignment; and check one or more Operations and then save the transaction.
The above functionality has to be achieved through an Upload program(using Excel) with a Function module/BAPI to serve our purpose. we already did the functionality upto creation of BOM but could not proceed further on this current requirement.
Kindly let me know your inputs if you have already worked in such type of requirement.
thanks in advance for your inputs and let me know if any further info is needed.
Regards,
Vishnu
Hi,
Check the Bapis for BOM
BAPI_MATERIAL_BOM_GROUP_CREATE
CSAP_MAT_BOM_MAINTAIN
I hope second BAPI will be more usefull for your requirement.
Regards,
Goutam Kolluru.
Similar Messages
-
How to use function module to update data
Hello ,
Can any body have idea how we can use function module SAVE_TEXT to update the master recipe header and operation long text.
I want to use this functional module to update the master recipe long text
step by step procedure is highly appreciated
thanks & regards
siddhasrthHi
SAVE_TEXT
SAVE_TEXT writes a text module back to the text file or the text memory, depending on the storage mode of the corresponding text object.
You can use this module either to change existing texts or to create new texts. If you know for sure that the text is new, use the parameter INSERT to indicate this. The system then does not have to read the text first, which improves the performance of the function module.
If the lines table passed with the function module is empty, the system deletes the text from the text file.
Function call:
CALL FUNCTION 'SAVE_TEXT'
EXPORTING CLIENT = SY-MANDT
HEADER = ?...
INSERT = SPACE
SAVEMODE_DIRECT = SPACE
OWNER_SPECIFIED = SPACE
IMPORTING FUNCTION =
NEWHEADER =
TABLES LINES = ?...
EXCEPTIONS ID =
LANGUAGE =
NAME =
check thi sample code
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = t_header
SAVEMODE_DIRECT = 'X'
* OWNER_SPECIFIED = ' '
* LOCAL_CAT = ' '
* IMPORTING
* FUNCTION =
* NEWHEADER =
TABLES
LINES = t_long
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
Reward all helpfull answers
Regards
Pavan -
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 -
HR-ABAP Any BAPI or Function module to update infotypes 167 & 170
Hi,
Can anyone let me know is there any BAPI or Function module to update infotypes 167(Health Plans) & 170(Flexible Spending Accounts).
Thanks,
SandeepHi,
U can use HR_BEN_CREATE_PLANS internally it calls HR infotype operation as specified by suresh.
Suresh : If there are approximately 3000 records to be updated on regular basis do u think is it better to use BAPI's or BDC
regards
Vick -
Functionality / modules currently available in MySAP for asset tracking.
Hi All,
We have a new requirement in the asset accounting. If any one have come accross can you let me know the feasibility and the process.
1.Functionality / modules currently available in MySAP for asset tracking.
2.Could MySAP support data input from other external devices e.g. scanner.
3.What kind of asset level info is stored in MySAP and how they are modified along the asset life cycle
Thanks nd Regards
Srihari BollaYes this is possible.
In the asset itself you have the fields Last inventory on and Include asset in inventory list
From SAP you can print barcodes (asset and asset sub number) that you can put on your assets TC S_ALR_87010137 - Bar Codes . There is a standard SAP script for this, but you can create your own one.
The date you want to use for your tracking you can get ot ouf the table ANLA
For all the barcode's reader there is software that can create a file. This file you upload with an LSMW in SAP that updates the field Last inventory on. -
Calling Function Module in Update Task
Hello Experts,
Can anyone let me know about
Calling Function Module in Update Task.
Why do we use this " In Update Task " ??
How do we Use ??
What is the Use... ??
Kindly let me know....
Thanks and Regards
Pramodhi,
Why do we use this " In Update Task " ??
The main update technique for bundling database changes in a single database LUW is to use CALL FUNCTION... IN UPDATE TASK.
How do we Use ??
A typical R/3 installation contains dialog work processes and at least one update work process. The update work processes are responsible for updating the database. When an ABAP program reaches a COMMIT WORK statement, any function modules from CALL FUNCTION... IN UPDATE TASK statements are released for processing in an update work process. The dialog process does not wait for the update to finish. This kind of update is called asynchronous update.
What is the Use... ??
Asynchronous update is useful when response time from the transaction is critical, and the database updates themselves are so complex that they justify the extra system load
Real time scenario.
Suppose a user wants to change an entry in a database table, or add a new one. He or she enters the necessary data, and then starts the update process by choosing Save. This starts the following procedure in the ABAP program:
Firstly, the program locks the database entry against other users, using the enqueue work process (or the message server in the case of a distributed system). This generates an entry in the lock table. The user is informed whether the update was successful, or whether the lock could not be set because of other users.
If the lock is set, the program reads the entry that is to be changed and modifies it. If the user has created a new entry, the program checks whether a record with the same key values already exists.
In the current dialog work process, the program calls a function module using CALL FUNCTION... IN UPDATE TASK, and this writes the change details as an entry in table VBLOG.
When the program is finished (maybe after further dialog steps), a COMMIT WORK statement starts the final part of the SAP LUW. The work process that is processing the current dialog step starts an update work process.
Based on the information passed to it from the dialog work process, the update work process reads the log entries belonging to the SAP LUW from table VBLOG.
The update work process passes this data to the database for updating, and analyzes the return message from the database. If the update was successful, the update work process triggers a database commit after the last database change and deletes the log entries from table VBLOG.
If an error occurred, the update work process triggers a database rollback, leaves the log entries in table VBLOG, flags them as containing errors, and sends a SAPoffice message to the user, who should then inform the system administrator.
The corresponding entries in the lock table are reset by the update work process.
Hope this is helpful, Do reward. -
Function Module to Insert Agent assignment upon creation of Responsibility
Hi Friends,
Using BDC I am able to create Resposibilities in Responsibilities tab of PFAC tcode.
I need to insert Agent assignment under created Responsibility.
Actually In Tcode PFAC I enter Rule then select change button this will lead us to next screen there i select Responsibilities tab
there I select create button then it will give a pop-up in that i will enter Object abbr. and Name then i will select continue.
then next i will enter category then select save.
Up to this using recording I am able to create Responsibilities but here i need to come back and i need to select just now created
Responsibility and i need to select insert agent assignment icon then it will give popup there i need to select Orgnizational unit then continue then it will give small popup ther i need to give search term (what ever we entered in Object abbr.) then continue again one popup will come ther we need to select that Org.unit check box then continue then it will one more popup there i need to select create then it will be inserted under Responsibilitty.
In the above entire explanation I am able do upto create Responsibilities but to insert agent assignment we need to come back after save but it is not possible through Recording because after save Recording will be ended.
So could you please guid me how to insert agent assignment under just created Responsibility.
If there is any function module to do that please suggest me .
Thanks
ChanduHi,
I tried like that also.
Whenever we need to insert agent assignment under just created Responsibility we need to select just created responsibility
created by first BDC . But in seccond BDC WITH TCODE OOCU_RESP Recording is not capturing that action (selecting just created Responsibility).
It is giving the message 'You did not select a valid object' in the status bar.
So It is unable to insert agent assignment under responsibility.
I think there would a function module which insert agent assignment under selected responsibility.
If anybody knows please suggest me or am I making any mistake ?
If you would like to see my code pls find below.
*& Report YCRM_CREATE_REPBLT_AGENT
REPORT ycrm_create_repblt_agent.
*Selection Screen
PARAMETERS : p_rule TYPE pdtask-seark OBLIGATORY,
p_file TYPE rlgrap-filename OBLIGATORY.
*Data Declarations
TYPES : BEGIN OF ty_resp,
short TYPE p1000-short,
stext TYPE p1000-stext,
category TYPE ro_expr, "EDIT_BIND_DEF-EXPR_LOW(02),
END OF ty_resp.
DATA : it_resp TYPE TABLE OF ty_resp,
wa_resp TYPE ty_resp,
p_file1 TYPE string.
DATA : it_bdcdata TYPE TABLE OF bdcdata,
wa_bdcdata TYPE bdcdata,
it_bdcmsgcoll TYPE TABLE OF bdcmsgcoll,
wa_bdcmsgcoll TYPE bdcmsgcoll.
*Constants Declarations
CONSTANTS : c_x TYPE c VALUE 'X',
c_tcode(4) TYPE c VALUE 'PFAC',
c_mode TYPE c VALUE 'A'.
*AT SELECTION-SCREEN event for providing f4 help for input file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM file_on_f4.
*Start of selectin event.
START-OF-SELECTION.
File Upload
PERFORM upload_file.
*BDC Logic
PERFORM bdc_to_create_rep.
*& Form BDC_DYNPRO
text
-->P_0061 text
-->P_0062 text
FORM bdc_dynpro USING fp_program "value(p_0061)
fp_dynpro. "value(p_0062).
CLEAR wa_bdcdata.
wa_bdcdata-program = fp_program.
wa_bdcdata-dynpro = fp_dynpro.
wa_bdcdata-dynbegin = c_x.
APPEND wa_bdcdata TO it_bdcdata.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
text
-->P_0066 text
-->P_0067 text
FORM bdc_field USING fp_fnam "value(p_0066)
fp_fval. "value(p_0067).
CLEAR wa_bdcdata.
wa_bdcdata-fnam = fp_fnam.
wa_bdcdata-fval = fp_fval.
*WA_BDCDATA-DYNBEGIN = C_X.
APPEND wa_bdcdata TO it_bdcdata.
ENDFORM. " BDC_FIELD
*& Form FILE_ON_F4
text
--> p1 text
<-- p2 text
FORM file_on_f4 .
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
field_name = 'P_FILE'
CHANGING
file_name = p_file
EXCEPTIONS
mask_too_long = 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.
ENDFORM. " FILE_ON_F4
*& Form UPLOAD_FILE
text
--> p1 text
<-- p2 text
FORM upload_file .
p_file1 = p_file.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = p_file1
has_field_separator = 'X'
CHANGING
data_tab = it_resp
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
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
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. " UPLOAD_FILE
*& Form BDC_TO_CREATE_REP
text
--> p1 text
<-- p2 text
FORM bdc_to_create_rep .
LOOP AT it_resp INTO wa_resp.
REFRESH : it_bdcdata,
it_bdcmsgcoll.
*Screen 0600
PERFORM bdc_dynpro USING 'SAPLRHWS' '0600'.
PERFORM bdc_field USING 'BDC_CURSOR'
'PDTASK-SEARK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=AEND'.
PERFORM bdc_field USING 'PDTASK-SEARK'
p_rule. "'90000159'.
*Screen 0040
PERFORM bdc_dynpro USING 'SAPLRHWS' '0040'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=RESP'.
PERFORM bdc_field USING 'BDC_CURSOR'
'HRS1000-SHORT'.
PERFORM bdc_field USING 'HRS1000-SHORT'
'Z99999999972'.
PERFORM bdc_field USING 'HRS1000-STEXT'
'Category (RUN -SUPPORT) + C&PS Web'.
PERFORM bdc_field USING 'HRS1203-ACTOR_FLAG'
'R'.
*Screen 0040
PERFORM bdc_dynpro USING 'SAPLRHWS' '0040'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=INSE'.
PERFORM bdc_field USING 'BDC_CURSOR'
'DATESET'.
PERFORM bdc_field USING 'DATESET'
'O'.
*Screen 0300
PERFORM bdc_dynpro USING 'SAPLSPO4' '0300'.
PERFORM bdc_field USING 'BDC_CURSOR'
'SVALD-VALUE(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=FURT'.
PERFORM bdc_field USING 'SVALD-VALUE(01)'
wa_resp-short. "'PL-BK'.
PERFORM bdc_field USING 'SVALD-VALUE(02)'
wa_resp-stext. "'Plan - BendixKing Team'.
*Screen 0200
PERFORM bdc_dynpro USING 'SAPLRHUZ' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'EDIT_BIND_DEF-EXPR_LOW(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_field USING 'P1000-BEGDA'
'23.03.2011'.
perform bdc_field using 'P1000-ENDDA'
'31.12.9999'.
PERFORM bdc_field USING 'P1000-SHORT'
wa_resp-short. "'PL-BK'.
PERFORM bdc_field USING 'P1000-STEXT'
wa_resp-stext. "'Plan - BendixKing Team'.
PERFORM bdc_field USING 'EDIT_BIND_DEF-EXPR_LOW(02)'
wa_resp-category. "'z11'.
CALL TRANSACTION c_tcode USING it_bdcdata
MODE c_mode
MESSAGES INTO it_bdcmsgcoll.
IF sy-subrc <> 0.
MESSAGE i001(ymsg)."Error Message
ROLLBACK WORK.
ELSE.
REFRESH : it_bdcdata,
it_bdcmsgcoll.
**screen 0410
PERFORM bdc_dynpro USING 'SAPLRHUZ' '0410'.
PERFORM bdc_field USING 'BDC_CURSOR'
'P1000-OBJID'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=CHG'.
PERFORM bdc_field USING 'P1000-OBJID'
p_rule. "'90000162'.
**screen 0420
PERFORM bdc_dynpro USING 'SAPLRHUZ' '0420'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=RELI'.
PERFORM bdc_field USING 'DATESET'
'O'.
**screen 0110
PERFORM bdc_dynpro USING 'SAPLRHW0' '0110'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=CONT'.
**screen 0100
PERFORM bdc_dynpro USING 'SAPLRHWL' '0100'.
*perform bdc_field using 'BDC_CURSOR'
'PCHDY-SEARK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=CONT'.
PERFORM bdc_field USING 'PCHDY-SEARK'
wa_resp-short. "'PL-BK'.
**screen 0120
PERFORM bdc_dynpro USING 'SAPMSSY0' '0120'.
*perform bdc_field using 'BDC_CURSOR'
'04/03'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
**screen 0400
PERFORM bdc_dynpro USING 'SAPLRHUA' '0400'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=INSE'.
*perform bdc_field using 'BDC_CURSOR'
'PERIOD-BEGDA'.
PERFORM bdc_field USING 'PERIOD-BEGDA'
'29.03.2011'.
PERFORM bdc_field USING 'PERIOD-ENDDA'
'31.12.9999'.
CALL TRANSACTION 'OOCU_RESP' USING it_bdcdata
MODE c_mode
MESSAGES INTO it_bdcmsgcoll.
IF sy-subrc <> 0.
MESSAGE i001(ymsg)."Error Message
ROLLBACK WORK.
ELSE.
MESSAGE i000(ymsg)."Success Message
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " BDC_TO_CREATE_REP
Guide me on this.
Thanks -
Function module to update right optimized dso
Hi Experts,
Is there any standard function module available to insert data into the right optimized DSO from transformation routine. Or programmatically we need to do this.
Thanks in advance.Hi,
Here there are two DSO used. One to collect the corrrect records and the other to collect the error records. Which will used later for reconciliation with the business and then again loaded after the rectification.
So from the transformation of the Main DSO we need to update the error DSO (when ever any validation fails).
Let me know any function module to update the right optimized DSO.
Thanks,
Jugal.
Edited by: jugal behera on Feb 6, 2008 4:38 AM -
Function module to update net price in purchase information record ???
hi all,
Is there any function module to update net price (PREIS) for each material in the purchase info record?
points will be rewarded for helpful answersHi,
Use below FM :
Clear : i_prot.
refresh : i_prot.
Delivery Update
CALL FUNCTION 'LE_MOB_DELIVERY_UPDATE'
EXPORTING
do_commit = 'X'
TABLES
t_delivery_items = i_lips
prot = i_prot
EXCEPTIONS
conversion_overflow = 1
essential_data_missing = 2
error = 3
nothing_to_update = 4
lock_after_update_failed = 5
error_in_delivery_update = 6
OTHERS = 7.
COMMIT WORK.
Pass lips-lgort..
Refer
https://forums.sdn.sap.com/click.jspa?searchID=4212688&messageID=3855382
Regards -
Any Bapi or function Module to update standard table
Can u Plz let me know , is there any bapi or function module to update few fields of a standard table using an internable.
I don't know if any FM exists for your requirement. But you may like to copy it into a custom table and modify it according to your enterprise needs.
-
Functional module to update claim status
Hi,
What is the functional module to update the claim status & technical key name of each status in claims & reimbursement.
Thanks,
Snita ShawHi Snita,
Check for the functional module - HRPBSINCLAIMS_CLS_READ_CTH and here the process would be where the employee raises a request in ESS and after the approval the report ,
1. HRPBSIN_AC_INFU - Advanced Claims: Infotype Update Report will be executed for the updation of details in ECC and even after the updation this report will be executed to update the approval status of the claim.
2. HRPBSIN_AC_ACRP - Advanced Claims: Display Records this report can be used to the display the request and also the adminsitrator can change the approver if needed.
Regards,
Mithun K -
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 -
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
YathishFor 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 Bill of Lading & No. of packages in a Delivery
Hi,
Can any one suggest me a function module to update Bill of Lading & No. of packages in a Delivery ?
Thanks in Advance.Hi:
I am also trying to update components of PM. I used the function CO2M_COMPONENT_CHANGE_WITH_REF, but I am not sure if I am passing the correct parameters. If possible can you please send a sample code Or you can take a look at my code and tell me where I am doing wrong.. Thanks.
Here is what I am passing into the the function:
DATA: in_resbd_new LIKE resbd,
in_rsnum_source LIKE resb-rsnum,
in_rspos_source LIKE resb-rspos,
in_rsart_source LIKE resb-rsart,
out_INDEX_BT LIKE SY-TABIX.
When I created the component, Requirement quantity of the component
was set to initial. I am trying to change that to 1.
in_resbd_new-MANDT = '200'.
in_resbd_new-RSNUM = '0000000708'. " from RESB-RSNUM
in_resbd_new-RSPOS = '0001'. " from RESB-RSPOS
in_resbd_new-MATNR = '000000000000000072'. " RESB-MATNR
in_resbd_new-WERKS = '0010'. " from RESB-WERKS
in_resbd_new-LGORT = '0010'. "" from RESB-lgort
in_resbd_new-MENGE = '1'.
in_rsnum_source = '0000000708'.
in_rspos_source = '0001'.
CALL FUNCTION 'CO2M_COMPONENT_CHANGE_WITH_REF'
EXPORTING
i_resbd_new = in_resbd_new
i_rsnum_source = in_rsnum_source
i_rspos_source = in_rspos_source
i_rsart_source = in_rsart_source
IMPORTING
E_INDEX_BT = out_INDEX_BT
EXCEPTIONS
ERROR_OCCURED = 1
OTHERS = 2
The return value in out_index_bt is '1'.
Thanks for your help.
Maybe you are looking for
-
Dear friends, We have chagned the price in t.code MR22. It shows price chagne document is generated successfully. While we try to display price chagne doc via tcode CKMPCD or CKM3 mat analysis. None are showing those detail
-
Stock Transfer between Storage Location with Order
Dear MM experts, I am into SAP SD. Our client wants to Transfer Stock from one Storage Location to another Storage Location of the same Plant. (This can be easily done thru MB1B via Transfer Posting) But the unique requirement here is they require s
-
How to send messages alternately to two MTA's?
I would like to set up a constallation of a HA-iMS 5.1 and two Virusscanners working parallel but not clustered. How can I address those two MTA's (Virusscanners) alternatly or even randomly. Thanks in advance, Roberto
-
Substitution Variables on webforms
Can you set a substitution variable to mutliple members to be used on a webform. IE. MultipeYrs = 2007,2008,2009 It works for a BR but not in the webform. Any suggestions would be appreciated. Thanks Tom
-
Whats a Backlight, and How Can i fix it.?
i went to apple and they said my backlight went out ..my screen is Totally blank still.. my brother want to buy me a new screen would that fix my problem