BDC for MM02 - Quality management
Hi Friends,
I need to create BDC program for MM02 with Quality Management View.
My problem is with the sequence of the QM view in MM02 for different material types as per with recording.
Kindly suggest me to resolve the issue.
Thanks & Regards,
S.Suresh
Edited by: The Rock on Nov 7, 2011 1:43 PM
Hi S.Suresh,
I would simply read table QMAT to check if material/plant has Inspection Type '01'.
Then, in case Inspection Type needs to be created, just call the BAPI_MATINSPCTRL_SAVEREPLICA FM with structure INSPECTIONCTRL properly filled-in.
If successful, then remember to call BAPI_TRANSACTION_COMMIT.
Hope this could help.
Bye,
Flavio
Similar Messages
-
Hi Friends,
i want to write a BDC FOR MM02 T.CODE AT PLANT LEVEL AND METERIAL LEVEL.
I WANT UPLOAD THE BELOW FEILDS DATA :
THE FIELDS THAT I WANT UPLOAD IS EISBE(SAFETY STOCK) , MAABC(ABC INDICATOR)
AND WZEIT(LEAD TIME).....AT PLANT LEVEL AND METERIAL LEVEL.
PLS HELP ME.... IT IS AN URGENT.
REGARDS,because with LSMW , you can standard program RMDATIND (direct input ==> faster than batch input.
In step 1 : you select standard program (OBject 0020 method 0000)
In step 2 you define source structure ZSRC_MARA
In step 3 you list the fields : MATNR, WERKS, MAABC, MINBE
In step 4 you make the link of your source struture to BGR00, BMM00, BMMH1
In step 5 you map your fields + BMM00-XEID1 ( you have to flag the views you consider).
Finished from developpement side
DAvid -
Hi,
I am working on a BDC for the tcode MM02 in which i have to insert the Inspection Type in the Quality Managment View of materials. i had executed the code which was working fine,but when i executed it ,it remains on the same screen where the after specifying on the file path. I dont know why it is happening ,plzz provide me guidelines for solving this problem.report ZMM02 no standard page heading line-size 255.
include bdcrecx1.
DATA: BEGIN OF ZVBM OCCURS 0,
MATNR(18) TYPE C,
BRGEW(16) TYPE C,
NTGEW(16) TYPE C,
END OF ZVBM.
start-of-selection.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'c:\vijay.txt'
FILETYPE = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = ZVBM
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
perform open_group.
LOOP AT ZVBM.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RMMG1-MATNR'
zvbm-matnr.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'MAKT-MAKTX'
'VIJAY3'.
perform bdc_field using 'MARA-MEINS'
'KG'.
perform bdc_field using 'MARA-MATKL'
'01'.
perform bdc_field using 'MARA-SPART'
'01'.
perform bdc_field using 'BDC_CURSOR'
'MARA-NTGEW'.
perform bdc_field using 'MARA-BRGEW'
zvbm-brgew.
perform bdc_field using 'MARA-GEWEI'
'KG'.
perform bdc_field using 'MARA-NTGEW'
zvbm-ntgew.
perform bdc_transaction using 'MM02'.
ENDLOOP.
perform close_group. -
Hello everyone!
I have developed a BDC program to batch input data into MM02 / MRP area.
It's working perfectly fine when I use mode 'A' in CALL TRANSACTION statement, but when I change it to 'N', so I can give this for the customer to test, it stops working, giving me an error in one of the screens, saying the "MRP area is not assigned to plant CH01" (when running with mode "E" it also gives me the error).
Here's my coding:
REPORT zload_mrp_areas.
Data and variables definition
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF t_header OCCURS 0,
link LIKE mara-matnr,
matnr LIKE mara-matnr,
werks LIKE marc-werks,
mstae(2) TYPE c,
perkz(2) TYPE c,
END OF t_header.
DATA: BEGIN OF t_details OCCURS 0,
muvbr(5) TYPE c,
unvbr(5) TYPE c,
matnr LIKE mara-matnr,
priod(6) TYPE c,
gsvbr(5) TYPE c,
END OF t_details.
DATA: v_count(3) TYPE n,
v_week LIKE scal-week,
v_week1(6) TYPE n,
v_week2(6) TYPE n,
v_page(5) TYPE p DECIMALS 2,
v_index(3) TYPE n,
v_field(19) TYPE c,
v_mode TYPE c,
v_date1 LIKE sy-datum,
v_date2 LIKE sy-datum,
v_date3 TYPE i.
Screen definition
SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
PARAMETERS: headfile LIKE rfpdo1-febauszf OBLIGATORY,
detsfile LIKE rfpdo1-febauszf OBLIGATORY.
SELECTION-SCREEN END OF BLOCK 1.
File selection
AT SELECTION-SCREEN ON VALUE-REQUEST FOR headfile.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
mask = ',Multicash,*.txt'
static = 'X'
CHANGING
file_name = headfile.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR detsfile.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
mask = ',Multicash,*.txt'
static = 'X'
CHANGING
file_name = detsfile.
START-OF-SELECTION *
START-OF-SELECTION.
Load files
PERFORM load_files.
PERFORM process_file.
*& Form LOAD_FILES
Load files from network to SAP
FORM load_files .
File upload
DATA: l_filename TYPE string.
l_filename = headfile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_filename
filetype = 'ASC'
TABLES
data_tab = t_header.
IF sy-subrc <> 0.
ENDIF.
l_filename = detsfile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_filename
filetype = 'ASC'
TABLES
data_tab = t_details.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. " LOAD_FILES
*& Form process_file
Load files into Material Master
FORM process_file .
LOOP AT t_header.
REFRESH bdcdata.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
PERFORM bdc_field USING 'RMMG1-MATNR' t_header-matnr.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_OKCODE' '=SELA'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_OKCODE' '=ENTR'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '0080'.
PERFORM bdc_field USING 'RMMG1-WERKS' t_header-werks.
PERFORM bdc_field USING 'BDC_OKCODE' '=ENTR'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE' '=SP12'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE' '=PB42'.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0010'.
PERFORM bdc_field USING 'SMDMA-BERID(01)' 'X'.
PERFORM bdc_field USING 'BDC_OKCODE' '=AEND'.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0020'.
PERFORM bdc_field USING 'BDC_OKCODE' '=SP04'.
CLEAR v_week.
CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'
EXPORTING
date = sy-datum
IMPORTING
week = v_week.
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING
week = v_week
IMPORTING
date = v_date1.
LOOP AT t_details WHERE matnr = t_header-matnr.
CLEAR: v_week1, v_week2.
v_week1 = v_week.
v_week = t_details-priod.
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING
week = v_week
IMPORTING
date = v_date2.
v_date3 = v_date1 - v_date2.
v_page = v_date3 / 7.
IF v_page > 11.
v_index = v_page MOD 11.
v_page = v_page / 11.
COMPUTE v_count = TRUNC( v_page ).
ELSE.
v_index = v_page.
ENDIF.
IF v_index IS INITIAL.
v_index = 11.
v_count = v_count - 1.
ELSE.
v_index = v_index + 1.
ENDIF.
Paging
IF v_count NE 0.
v_count = v_count + 1.
DO v_count TIMES.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0020'.
PERFORM bdc_field USING 'BDC_OKCODE' '=P-'.
ENDDO.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0020'.
PERFORM bdc_field USING 'BDC_OKCODE' '=P++'.
v_count = v_count - 1.
DO v_count TIMES.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0020'.
PERFORM bdc_field USING 'BDC_OKCODE' '=P-'.
ENDDO.
ENDIF.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0020'.
v_field = 'RM03M_DB-KOVBW(*)'.
REPLACE '*' WITH v_index INTO v_field.
PERFORM bdc_field USING v_field t_details-muvbr.
v_field = 'RM03M_DB-VBWRT(*)'.
REPLACE '*' WITH v_index INTO v_field.
PERFORM bdc_field USING v_field t_details-unvbr.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0020'.
PERFORM bdc_field USING 'BDC_OKCODE' '=WEIT'.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0020'.
PERFORM bdc_field USING 'BDC_OKCODE' '/00'.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0020'.
PERFORM bdc_field USING 'BDC_OKCODE' '=P++'.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0020'.
PERFORM bdc_field USING 'BDC_OKCODE' '=UEBE'.
PERFORM bdc_dynpro USING 'SAPLMD_MGD1' '0010'.
PERFORM bdc_field USING 'BDC_OKCODE' '=UEBE'.
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'.
DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
v_mode = 'N'.
CALL TRANSACTION 'MM02' USING bdcdata
MODE v_mode
UPDATE 'S'
MESSAGES INTO ITAB.
if sy-subrc is initial.
endif.
ENDLOOP.
ENDFORM. " process_file
*& Form BDC_DYNPRO
text
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
*& Form BDC_FIELD
FORM bdc_field USING fnam fval.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDFORM. "BDC_FIELD
Can anyone help? Please!
Thanks and regards,
FernandaYou are trying to access one of the MRP area which is not yet assigned to CH01 plant. You need to make sure wheather the MRP view was already created for that material for CH01 plant.
So, first check your data against the MARC for material and plant. If you don't fine any material for that plant than don't run BDC for that plant.
Regards,
Naimesh Patel -
HI,
I am trying to make BDC for updating Table - MARD, Feild - LGPBE using MM02.
The problem I facing is the selection of view (General Plant Data/ Storage 1).
For VERP Materials, it comes to 12th Position, while for HALB Materials is on 15th Position.
The reason for the same is that for VERP Materials, the Sales Views are not maintained.
I am facing the similar kind of problem while creating the BDC for MASS (Using Mass Maintenance - BUS1001).
I need to update the Storage Bin of all Materials.
What is the correct way to upload the same?
Thanks & Regards,
P K Karnhi PK you have to program your BDC according to material type..
eg if material type = HALB
BDC1
else if material type = VERP
BDC2..
end if
regards.. -
A Quality report as a tool for the Quality management of Web services
Hi everybody,
I would like to explain and discuss my current research project with you:
The differentiation from competitors is crucial for the economic success of a product. This differentiation can be achieved in addition to price and the date of the market entry through the product quality. To differentiate the quality of products, it is necessary to distinguish between several relevant product characteristics, to determine their values, to evaluate these values and to relate this evaluation to the evaluation of other products. Techniques for the determination of the quality of a product are used in many areas of the quality management, e.g. in the quality assessment.
Web Services are software systems supporting a machine-machine interaction over a network. Web services are often used as modules in different software architectures, especially in Service-oriented architectures (SOA).
In the course of quality management of a Web service applied in software consequently needs appropriate procedures and quality models as means to determine the quality. As there is a lack, research is needed in this field.
In order to eliminate the described deficit, a procedure is to develop that helps to determine the quality of a Web service. A report is conceivable which integrates all relevant views, all influences on the quality and all phases of the life cycle of a Web services.
During the research a lot of similarities between Life cycle assessments of environmental management and the quality management have been identified. These similarities include e.g. principles, procedures and the terminology. Since the Life cycle assessments relate on the product life cycle, on the stakeholders and on all relevant product characteristics, an adaption of the method on the quality management of software seems to be promising.I would like to answer the following two research questions:
- Is it possible to adapt the principles and procedures of Life cycle assessment and Sustainability reporting to the quality management of Web services?
- Is a quality report based on these findings an appropriate tool for quality management?
Do you have any experiences with the quality management of Web services? Which procedures do you use to determine the quality of Web services? How are your experiences with that procedures? Where are their weaknesses?
Edited by: Bastian Grabski on Jan 7, 2010 11:36 AM -
BDC for MM02 Internal comments - Not working
I have created a BDC that inputs internal comments using MM02. It moves the data in okay in the BDC. The data is there the way it was formated. Several lines of comments added. But after it saves the data - it takes all of the lines and appends them into one and fills up the lines. For example - enter: line 1, then enter line: 2. Instead of having 2 lines showing 1 on the first and 2 on the second - I get 1 lines howing both: 2.
Any ideas?Check this. I think you may like it. This program excepts the material number and changes the internal comment text. I am forcing two lines, when I check after executing this program, the text is there in two lines. Please see if you can use the BAPI instead of BDC.
report zrich_0003 .
data: headdata type bapimathead.
data: clientdata type bapi_mara.
data: clientdatax type bapi_marax.
data: matlongtext type table of bapi_mltx with header line.
data: return type bapiret2 .
data: returnm type table of bapi_matreturn2 with header line.
data: xmara type mara.
parameters: p_matnr type mara-matnr.
select single * from mara into xmara
where matnr = p_matnr.
headdata-material = xmara-matnr.
headdata-ind_sector = xmara-mbrsh.
headdata-matl_type = xmara-mtart.
<b>matlongtext-applobject = 'MATERIAL'.
matlongtext-text_name = p_matnr.
matlongtext-text_id = 'IVER'.
matlongtext-langu = sy-langu.
matlongtext-text_line = 'This is line 1'.
append matlongtext.
matlongtext-applobject = 'MATERIAL'.
matlongtext-text_name = p_matnr.
matlongtext-text_id = 'IVER'.
matlongtext-langu = sy-langu.
matlongtext-text_line = 'This is line 2'.
append matlongtext.</b>
call function 'BAPI_MATERIAL_SAVEDATA'
exporting
headdata = headdata
clientdata = clientdata
clientdatax = clientdatax
importing
return = return
tables
<b> materiallongtext = matlongtext</b>
returnmessages = returnm.
Regards,
Rich Heilman
PS.
Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
Spread the wor(l)d! -
Inspection lot PGI for STO-Quality management
Sirs,
I have a query. I have an FG where i am using an STO to transfer the material from 1 plant to another. Here i have inspection type 08 assigned in the master. I have assigned the origin 08 to the delivery type NL hence when i save the OBD (not post PGI) the inspection lot is generated. But even though the inspection lot is generated the system is allowing me to post the Goods Issue for the material. How do i bring the lock in invoicing so that if the lot is generated the PGI of the OBD is not allowed and system should give the message 'status of the inspection lot does not allow goods movement'..
Waiting for your replies,
Ariel.Dear,
i have the same question..
is there any way to generate inspection lot from PS Network activity?
is there any BADI or Workflow...?
i hope there would be any solution of this scenerio. -
hi all,
i am new to quality management. can anyone give me a guidance for familarizing quality management?Re: QM configuration & Master data's
To start with
Refer
QM
Re: QM configuration
Re: qm configuration doc(urgent)
Quality Management (QM)
The specified item was not found.
http://help.sap.com/bp_bl603/BBLibrary/Content_Library_BL_EN_IN.htm
Regards
Sujit.. -
Quality Management SRND or Docs?
Does anyone know if an SRND exists for Cisco Quality Management? Or if not, links to any docs?
ThanksI don't think they call it SRND for the WFO products. You can find what you require from the following http://www.cisco.com/en/US/partner/products/ps8293/products_implementation_design_guides_list.html
Thanks!
-JT- -
Create Quality Management view for a Material in background mode
I want to know if there is a way to create a Quality Management View (Quality Management tab) on Material Master (material already extended to plant ) in background mode.
The requirement is to add inspection setup data for a material extended to a particular plant in background. I tried using 'BAPI_MATINSPCTRL_SAVEREPLICA' to add the data and it works perfect as required. Now the problem is this BAPI is creating the inspection setup data only for the material which has QM tab in MM02 for e.g. I manually created the inspection setup for a Material from MM01 and then deleted it , now the BAPI works fine for this material because when I created an inspection setup from MM01 it created the QM tab and after i deleted the entry the tab was still there with no entry in inspection setup.
I want to create inspection setup for a material which does not have QM tab.
I have to create everything is background mode. BDC is one option which I am list interested in.
Thank you for helping in advance.Thank you for looking into my issue. I have to do the inspection setup in background without using any front end transaction.
-
Is Quality management module required to be used for vendor evaluation?
Hi,
There is vendor evaluation functionality in MM. Is use of quality management module is mandatory for this? I wish to track the performance of vendor regarding quality (How much he has supplied, out of which how many are accepted and how many are rejected). Can I get this report without using QM?
Thanks in advance,
Satishyou can enter Quality results manually in vendor evealuation, so QM is not necessary for this, however with QM you can get the scores semi-automatic and automatically.
-
Function module for Mass uploadnotifications in Quality Management
Hi Experts,
I need function module for quality management which MASS UPLOAD THE QM NOTIFICATIONS.
ThanksHi,
For updation use BAPI_QUALNOT_ADD_DATA.
Hope it helps.
Regards
Hiren K.Chitalia -
Hello.
Appreciate your help on this...
I am using the BDC for updating the quality info record in transaction QI01.
under quality agreement tab.i have a multiple linked document.against the material and vendor.
So in this case how to handle the multiple item record .
Please reply back ASAP..
Thanks
ManojHello,
This is quite simple. This can be achieved by a easy recording step in the following way:
1. Navigate to the "Quality agreement" tab in Change mode.
2. Place the cursor in the first line of the table control. Push "Insert Line" button which will create a blank line in first line.
3. Fill the data and push "Save" button.
You can repeat this step for every document addition in QINF.
Hope this helps,
Best Regards, Murugesh AS -
Control Key for Quality Management in Procurement
if we activate Control Key for Quality Management in Procurement in material master then wether we need also store a control key at the plant level for quality management in procurement.
if we want want to maintaine
pls tell me how it is
pls expalin
faisalif we activate Control Key for Quality Management in Procurement in material master then wether we need also store a control key at the plant level for quality management in procurement.
I am not clear about your question. But I guess you want to know about control key function. You activate "proc. asctive" box in QM view of material master, that is always at plant level. When you activate this, system automatically asks for a control key & cert type, thats mandatory field.
Maybe you are looking for
-
Difference between Stop & Shutdown in SAPMMC ?
I checked out help.sap - http://help.sap.com/saphelp_nw70ehp1/helpdata/en/49/09b87271da740ee10000000a421937/frameset.htm but its not clear. Stop - Stops the SAP instance(s) or only its AS Java components related to the selected items Shutdown - Sends
-
TS1538 itunes does not see any of my devices.
itunes does not see any of my devices. It used to. But not any more. Why. They show up in Windows. But not itunes. <Edited by Host>
-
How do I create a slide show in a separate, non iPhoto folder?
I moved about a 1000 photos from iPhoto to a new folder I created in an external drive to save space in iPhoto. How do I create a slide show in the new folder? When I click a photo to enlarge it it goes into Preview mode which enables you to have a s
-
When run report from form(6i) on the web,error FRM-921000
While I was trying to run report from form (6i)on the web,it will give me this error message FRM-921000 and hang. But when I try to call form using form,I do not have the problem. May I know ehat is the cause? Anybody encounter this before? Thanks nu
-
Pictures Showing as White Boxes
I upgraded from an iPhone 5c to an iPhone 6. On December 22nd when I restored my phone from my iCloud backup all of my photos showed up as white boxes. Since then some have shown up but most of them are still showing up as white boxes. It says downlo