BDC/BAPI Assign characteristics to material using CL24n
Hi Gurus
My requirement is :
We have already assigned characteristics to the material class, Now we need to assign characteristics values to materials.
Assign characteristics to material using cl24n(Class name & Classtype) > only new assignments > material.
What should I go for ? BDC or BAPI.
Please suggest me how to proceed with BAPI as I personally feel BAPI is better than BDC.
Thanks in Advance
Dinesh
BAPI/BDC for assigning characteristic to material
Similar Messages
-
Bapi assign PO to material component
Hello
I am migrating some material components to a new project structure.
I have created the new material components and the new PO (based on the old ones) but i do not know now how to link the material component to the PO.Is there any BAPI that does this?
Do i have to first create a purchase requisition for this material component or how can i link the mat component to the PO.
I have used bapi's for creating material components and PO,so i would need also some bapi that could do something like that.
Is there any bapi for changing material component ?
thank youHi
before creating material components,we have to set the purchase requisition flag to "immediately" so that a purchase requisition is created immediately after material component creation.
Afterwards i have read the newly created PR's and gave them as parameter to the bapi for PO creation -
About Error in Assigning Characterstics in Material Master
HI
This is lingaraj khilar.I am facing the problem in assigning characteristics in material master.I have created batch classification for a raw material.After assigning the classification when i am gng to assign characterstics it has shown the error "Characteristic AGI_CAST_PC cannot be used for proportion or product units"
with Message No Message no. LB123.Here AGi_CAST is classification.So I want to revert back with solution.
Regards
Lingaraj KhilarHi,
I believe that you are trying to use the classification functionality in your material, fine
find the procedure and cross chekc whether you have used the same.
1. Define the charateristics and assign the value to it.
2. Define the class with class type 001.
3. Assign the charateristics tothe class.
4. use MM01/MM02> Classification--> Assign class Etc.
hope it helps..
manoj singh -
Assign Batch Class to Material - Using Upload
Hi All,
I have a requirement to assign batch class to material master (MM01 / MM02) - Classification view - Batch Class (022).
This assignment has to be done through a upload program (BDC / LSMW / BAPI). Can someone please suggest me the best possible option.
Note:
1. I don't want to assign batch characteristics values. Just wanted to assign batch class to material.
2. I have already created LSMW to load material master using LSMW direct input approach.
Thanks,
SomuHi Dev,
My existing LSMW was created using direct input approach which has no option to assign Batch Class to material.
So my thought is to create a separate program (LSMW / BDC / BAPI) to assign batch class to material.
Any best possible option please?
Thanks,
Somu -
To create a Material using BAPI with out passing the material number
Hello Experts,
I am using BAPI_MATERIAL_SAVEDATA to create a material of some Ztype. I am successfully creating a material if I am passing Material Number as input. I want the material number to generated internally.
When I am doing material creation with same input data with out material number using BDC, it is working fine. It is generating the material number.
But, not with the BAPI.
Do, I need to specify this some where in the BAPI to generate the Material number internally? Please let me know.
Please help me in this regard.
Thanks & Regards,
Naresh.Hi,
Read the BAPI documentation regarding Internal Number range for materials.
When you create material master data, the following fields must always
contain a value in the structure:
o MATERIAL
Only external number assignment is supported for the material number
(MATERIAL). If you want the material number to be assigned
internally, the method BAPI_MATERIAL_GETINTNUMBER must first be
called. This method determines an internal number for the material
to be created. You must enter this internal number in field
HEADDATA-MATERIAL.
Regards
Vinod -
BDC in user exit CONFPP05 - Material already used by User
I have requirement to create 551 movement Scrap from CO11N tcode whener user enters value for 'Yield' and 'Reason for variance' and press save button( Post).
I am unable to use BAPI because BAPI_GOODSMVT_CREATE (GMCODE 03= MB1A) since 551 mvmt can be done only through custom Tcode ZMB1A due to customization. Only option left was calling BDC for ZMB1A ( Call trasnaction been used) .
Problem:
BDC works outside as report program , but hen I call FM ( BDC) within userexit , it says Material lock by the user( Which is Me).
Calling from UserEXIT CONFPP05
CALL FUNCTION 'Z_POST_SCRAP_GI' ( Nothing but BDC call tran)
EXPORTING
MODE = 'N'
UPDATE = 'L'
bwart = mseg-bwart
werks = mseg-werks
grund = mseg-grund
lgort = afpo-lgort
matnr = mseg-matnr
erfmg = mseg-erfmg
erfme = mseg-erfme
aufnr = afpo-aufnr
TABLES
MESSTAB = MESSTAB .
This one works as report and not inside Userexit ( Returs errmsg already used by User which is myself).Here is the Dump, I am taking about after calling FM with Update Task
Category ABAP Programming Error
Runtime Errors POSTING_ILLEGAL_STATEMENT
ABAP Program SAPLY_FGRP
Application Component Not Assigned
Date and Time 03/06/2012 11:55:13
Short text
Statement "CALL TRANSACTION" is not allowed in this form.
|What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLY_FGRP" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
There is probably an error in the program
"SAPLY_FGRP".
This program is triggered in the update task. There, the
following ABAP/4 statements are not allowed:
- CALL SCREEN
- CALL DIALOG
- CALL TRANSACTION
- SUBMIT
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"POSTING_ILLEGAL_STATEMENT" " "
"SAPLY_FGRP" or "Y_ZMB1A_BDCREXCY"
"BDC_TRANSACTION"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
Source Code Extract
Line
SourceCde
27
HOLDDATE = P_HOLDDATE.
28
ENDIF.
29
*ENDFORM.
30
31
32
end batchinput session *
33
34
*FORM CLOSE_GROUP USING P_CTU LIKE APQI-PUTACTIVE.
35
IF P_CTU <> 'X'.
36
close batchinput group
37
CALL FUNCTION 'BDC_CLOSE_GROUP'.
38
ENDIF.
39
*ENDFORM.
40
41
42
Start new transaction according to parameters *
43
44
FORM BDC_TRANSACTION TABLES P_MESSTAB
45
USING P_TCODE
46
P_CTU
47
P_MODE
48
P_UPDATE.
49
DATA: L_SUBRC LIKE SY-SUBRC.
50
51
IF P_CTU <> 'X'.
52
CALL FUNCTION 'BDC_INSERT'
53
EXPORTING TCODE = P_TCODE
54
TABLES DYNPROTAB = BDCDATA
55
EXCEPTIONS OTHERS = 1.
56
ELSE.
>>>>>
CALL TRANSACTION P_TCODE USING BDCDATA
58
MODE P_MODE
59
UPDATE CUPDATE
60
MESSAGES INTO P_MESSTAB.
61
ENDIF.
62
L_SUBRC = SY-SUBRC.
63
REFRESH BDCDATA.
64
SY-SUBRC = L_SUBRC.
65
ENDFORM.
66
67
68
Start new screen *
69
70
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
71
CLEAR BDCDATA.
72
BDCDATA-PROGRAM = PROGRAM.
73
BDCDATA-DYNPRO = DYNPRO.
74
BDCDATA-DYNBEGIN = 'X'.
75
APPEND BDCDATA.
76
ENDFORM.
Active Calls/Events
No. Ty. Program Include Line
Name
7 FORM SAPLY_FGRP Y_ZMB1A_BDCREXCY 57
BDC_TRANSACTION
6 FUNCTION SAPLY_FGRP LY_FGRPU02 81
Y_POST_SCRAP_GI
5 FORM SAPLY_FGRP LY_FGRPU02 1
Y_POST_SCRAP_GI
4 FORM RSM13000 RSM13000 5513
VB_CALL_FUNC
3 FORM RSM13000 RSM13000 5219
VB_V1_EXEC
2 FORM RSM13000 RSM13000 3952
VB_V1_NORMAL
1 MODULE (PBO) RSM13000 RSM13000 3801
VBEXEC
Chosen variables -
Creation of Material using BDC Session method & global class
Hi
Creation of Material using BDC Session method & global class by using oops.
can anyone plz help me outHi,
it looks like it's not possible to call this BAPI wihtout material number. Here is a quote from BAPI documentation.
When creating material master data, you must transfer the material
number, the material type, and the industry sector to the method. You
must also enter a material description and its language.
Cheers -
Creation of material using BAPI in LSMW without using material no.
Hi SAP Gurus,
I have a requirement of creating materials using the BAPI in LSMW.
I tried to create a material using the BAPI (Business Object - BUS1001006 , and method - SAVEDATA) which should be created internally, but it is asking the material number to be given externally and my configuration is setup to create the material number internally.
Even I looked into the material type which is associated with the number range and everything looks good.
Is there any solution to create the material by using BAPI in LSMW without passing the material no. externally ?
Appreciate your help.
Kalikonda.Hi,
it looks like it's not possible to call this BAPI wihtout material number. Here is a quote from BAPI documentation.
When creating material master data, you must transfer the material
number, the material type, and the industry sector to the method. You
must also enter a material description and its language.
Cheers -
How to create a new material using a BAPI?
Dear friends,
How to create a new material using a BAPI? I mean without knowing the material no., how to just create a new one using function modules(BAPI)?
Thanks a lot!Dear,
New material can be created by using a BAPI_MATERIAL_SAVEDATA.
More over their are lots of threads available on SDN on the question you raised so kindly search the SDN before posting any thread .
Cheers
fareed -
Create material using bapi ' bapi_material_savedata'
Hi Experts,
i was tring to create material using bapi ' bapi_material_savedata' but the material is not updating in the table.
please find the code and suggest me if any modification
data: la_headdata type BAPIMATHEAD,
la_clientdata type BAPI_MARA,
la_CLIENTDATAX type BAPI_MARAX,
la_return type BAPIRET2.
data: i_materialdescription type table of BAPI_MAKT,
wa_materialdescription like line of i_materialdescription.
*la_headdata-MATERIAL = int_matnum-MATERIAL.
*LOOP AT int_matnum.
la_headdata-MATERIAL = int_matnum-MATERIAL.
write : int_matnum-material.
*ENDLOOP.
la_headdata-MATERIAL = '100000518'."int_matnum-MATERIAL.
la_headdata-IND_SECTOR = p_indsr.
la_headdata-MATL_TYPE = p_matype.
la_clientdata-BASE_UOM = 'FT3'.
la_clientdata-pur_valkey = ' '.
la_CLIENTDATAX-BASE_UOM = 'X'.
la_clientdata-MATL_GROUP = '01'.
la_CLIENTDATAX-MATL_GROUP = 'X'.
wa_materialdescription = 'TEST'.
append wa_materialdescription to i_materialdescription.
clear: wa_materialdescription.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = la_headdata
CLIENTDATA = la_clientdata
CLIENTDATAX = la_CLIENTDATAX
PLANTDATA =
PLANTDATAX =
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
STORAGELOCATIONDATA =
STORAGELOCATIONDATAX =
VALUATIONDATA =
VALUATIONDATAX =
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA =
SALESDATAX =
STORAGETYPEDATA =
STORAGETYPEDATAX =
FLAG_ONLINE = ' '
FLAG_CAD_CALL = ' '
IMPORTING
RETURN = la_return
TABLES
MATERIALDESCRIPTION = i_materialdescription
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
Please Help me
Regards,
NareshHi all,
Now it is asking me for the other fields,
E ,
The field MARA-XCHPF/BAPI_MARA-BATCH_MGMT is defined as a required field; it does not contain an entry
i have passed this val as
la_clientdata-batch_mgmt = 'X'.
even though i am getting the same error.
can you help me to solve the issue.
Tthanks
Naresh
Edited by: naresh.k.dasari on Jan 4, 2011 10:36 AM -
Hi All,
We are using BAPI_MATERIAL_SAVEDATA to change a material. But end user is not having the authorization to modify using this bapi. because this BAPI is used for both creation and for changing so it is checking creation object Authorization and it is failing.
Kindly suggest me some other BAPI to Change the material to avoid the above problem.try these..
/SAPMP/BAPI_MATERIAL_SAVEDATA Mill Products: Create and Change Material Master
BAPI_MATERIAL_MAINTAINDATA_RT Create and change material master data (retail)
BAPI_MATERIAL_EDIT Change Material -
Hi Friends,
I want to create a material using BAPI, can anyone give me some sample program or can any one give me links which earlier posted this problem.
Points for sure for sample program.
thanks and regards
Vijayahi
good
go through this REPORT z_bapi_salesorder_create.
Parameters
Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Data declarations.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
Initialization.
INITIALIZATION.
v_text = 'Order type'.
v_text1 = 'Sales Org'.
v_text2 = 'Distribution channel'.
v_text3 = 'Division'.
v_text4 = 'Sold-to'.
v_text5 = 'Ship-to'.
v_text6 = 'Material'.
v_text7 = 'Quantity'.
v_text9 = 'Plant'.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
header-doc_type = p_auart.
headerx-doc_type = 'X'.
Sales organization
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
Distribution channel
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
Division
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
Partner data
Sold to
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
Ship to
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI to create the sales order.
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
Commit the work.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF.
thanks
mrutyun^ -
Hi Guys,
I'm trying to delete a material, using BAPI_MATERIAL_SAVEDATA. The inputs i gave are the material number(Under Headdata Structure) and the Deletion Flag field as "X" (under ClientData structure). I'm also commiting the transaction..
But my material in SAP doesn't show a deletion flag to be set.
The doubt i have is, am i missing someother important field to do this??
Pls help me on this guys
Thanks
VarunThe field MANUF_PROF was mandatory
-
Delete BAPI for QS61 - Maintain material specification
Hi Expert,
I need to delete MIC (Master Inspection Characteristics) from QS61 using a BAPI.
I need to pass matnr, MIC & plant to the BAPI in order to delete the MIC
In other words, I need to call a BAPI which does the same as:
T-Code: Qs61 ==> F5 ==> Highlite the row ==> Shift F2 ==> Enter ==> SAVE
Thanks in advanceHi Raj,
Check the version of your master inspection characteristics. Perhaps the class characteristic hasn't been assigned the version that you are using in the material.
Regards,
Julian -
BAPI for characteristics and classes
Hi all,
I need to upload classifications, characteristics and characteristics value
and classes to the master and also need to extract the same from the material master..
Can any one of you suggest me any BAPI of function module or any othe way so as to implement the above requirement..
Useful answers will be rewarded..
Thanks in advance..
ArunHi,
Check all,
BAPI_CLASS_ALLOC_GLOB_DEP BAPI: Assign Global Dependencies to Class
BAPI_CLASS_CHANGE BAPI: Change Class
BAPI_CLASS_CHARVALUE_DEL_DEP Class BAPI: Delete Local / Global Dependencies for Characteristic Valu
BAPI_CLASS_CHARVALUE_GLOB_DEP Class BAPI: Assign Global Dependencies to Characteristic Value
BAPI_CLASS_CHARVALUE_LOCAL_DEP Class BAPI: Maintain Local Dependency for Characteristic Value
BAPI_CLASS_CHARVALUE_READ_ALLO Class BAPI: Read Dependencies for Characteristic Value
BAPI_CLASS_CHAR_ALLOC_GLOB_DEP Class BAPI: Global Dependencies for Characteristic
BAPI_CLASS_CHAR_DELETE_DEP Class BAPI: Delete Global / Local Dependency for Characteristic
BAPI_CLASS_CHAR_LOCAL_DEP Class BAPI: Assign / Delete Local Dependency for Characteristic
BAPI_CLASS_CHAR_READ_ALLOC Class BAPI: Read Dependencies for Characteristic
BAPI_CLASS_CHAR_VALUE_TEXT_DEL Class BAPI: Delete Overwriting of Long Text for Characteristic or Value
BAPI_CLASS_CHAR_VALUE_TEXT_OVR Class BAPI: Overwriting of Long Text for Characteristic or Value
Reward if useful!
Maybe you are looking for
-
Hi Gurus, PO created on behalf of PR with 7000 of Quantity, now after delivering 2000 of Qty, vendor refuses to supply balance Qty. Hence want to reduce QTY in PO and make a fresh PO for balance Qty to other vendor. But now unable to change Qty in P
-
Log Entries in Table CDPOS with a Z File Append in VBAK
Hi I'm trying to log changes of a new field appended in VBAK in table CDPOS, I already marked the data element of this new field with the checkbox for changes, but when i make some changes in VA02 on this new file, i can't see the changes in the m
-
Solaris Name Service Cache and Directory Proxy Problem
We have some Solaris 10 clients ldapcliented to a Directory Proxy Server. After 15 minutes, the Solaris name service cache will fail to communicate to the proxy instance and the proxy instance's readconnectionsrefused attribute will start incrementin
-
VIM Plugin VJDE, Ruby Error: invalid byte sequence in UTF-8
Hello I'm trying to install the vim VJDE Plugin for java syntax highlighting. wget tarball tar xvzf tarball makepkg -s pacman -U ... No Problems here. When i run vim foo.java it shows me this mesage: Error detected while processing /usr/share/vim/vim
-
[Flex Hero] How to put Google Mobile Ads in AIR on Android
Hi, everyone I am developing a free application with Adobe Flash Builder "Burrito". Thank you to Flex SDK team, the SDK is very easy to implement the application. My question is, Is it possible to put Google Mobile Ads in the application (for example