Bdc views
hi to all abap gurus
my querry is as follows
i run a bdc call trans program form mm01 to upload the material master data .
i dont know how to handle the views
can u pls give the coding for bdc program for using all views existing in the mm01 .
points will be rewarded definitely for good answers .
thanks & regards
Well here is an example for you to see how the views are dealt with in BDC's...
***This is a BDC for Semi finished Materials*******
report ZBDC_SEMIFIN
no standard page heading line-size 255.
include bdcrecx1.
Tables: Mara,"General Material Data
mard,"Storage Location Data for Material
mvke,"Sales Data for Material
Makt,"Material Descriptions
marc,"Plant Data for Material
mbew,"Material Valuation
rlgrap."Program Fields/Screen Fields for SAPLGRAP
Data: begin of ITAB occurs 0,"Internal table for Semi-Finished Material
Initial data
matnr like mara-matnr, "Material Code
mbrsh like mara-mbrsh, "Industry Data
mtart like mara-mtart, "Material Type
Org Data
Werks like marc-werks, "Plant
lgort like mard-lgort, "Storage Location
vkorg like mvke-vkorg, "Sales Orgnization
vtweg like mvke-vtweg, "Distribution Chanel
Basic 1
Maktx Like makt-maktx, "Description
meins like mara-meins, "Uom
matkl like mara-matkl, "Material Group
BISMT LIKE MARA-BISMT, " Old Material Number
spart like mara-spart, "Division
brgew(7),"like mara-brgew, "Gross Weight
gewei like MARA-GEWEI, "Weight Unit
ntgew(7)," like mara-ntgew, "Net Weight
Purchasing
MAKTL LIKE MARA-MATKL, "Material Group
ekwsl like MARA-EKWSL, " Purchasing Value Key
ekgrp like MARC-EKGRP, " Purchasing Group
Mrp 1
disgr like MARC-DISGR, "Mrp Group
ekgrp like MARC-EKGRP, "Purchasing group
dismm like MARC-DISMM, "Mrp Type
dispo like MARC-DISPO, "Mrp Controller
disls like MARC-DISLS, "Lot Size
BSTMI like MARC-BSTMI,
BSTMA like MARC-BSTMA,
BSTRF like MARC-BSTRF,
BSTFE like MARC-BSTFE,
Mrp 2
beskz like MARC-BESKZ, "Procurement type
lgpro like MARC-LGPRO, "Production Storage Location
dzeit(3),"like MARC-DZEIT, "In house Production time
plifz(3),"like MARC-PLIFZ, "Planned delivery time
fhori(3),"like MARC-FHORI, "Sched margin key
eisbe like MARC-EISBE, "Safety stock
Mrp 3
PERKZ LIKE MARC-PERKZ,
vrmod like MARC-VRMOD, "Consumption mode
vint1(3)," like MARC-VINT1, "Backward Consumption period
vint2(3),"like MARC-VINT2, "Forward Consumption period
mtvfp like MARC-MTVFP, "Availability Check
Mrp 4
sbdkz like MARC-SBDKZ, "Individual/ Collective
SAUFT like MARC-SAUFT, "Repetitive Manufacturing
SFEPR like MARC-SFEPR, "REM Profile
Work Scheduling View
ausme like MARC-AUSME, "Unit of issue
FEVOR LIKE MARC-FEVOR, "Production Scheduler
SFCPF like MARC-SFCPF, "Production Scheduler Profile
umren(5)," like RMMZU-UMREN, "Val for base uom
umrez(5) ,"like RMMZU-UMREz, "Value for uo issue
Accounting 1
bklas like MBEW-BKLAS, "Valuation Class
vprsv like MBEW-VPRSV, "Price Control Indicator
verpr(7)," like MBEW-VERPR, "Value/Price
STPRS like MBEW-STPRS,
*COSTING
EKALR LIKE MBEW-EKALR," With qty str
LOSGR like MARC-LOSGR, " Costing Lot size
end of ITAB.
Data: W_record type I, "Record Allready exists.
w_trecord type I. "Total record processed
start-of-selection.
perform upload. "Upload Data from Text File
Perform Open_group. "Create a session
clear : w_record,w_trecord.
perform semi. "Create Semi Finish Materials
if w_trecord gt 0 or w_record gt 0.
perform batch_job.
endif.
perform close_group. "Close session
FORM SEMI.
loop at ITAB.
Check for material in master *************************
select single * from mara where matnr eq ITAB-matnr.
if sy-subrc ne 0.
w_trecord = w_trecord + 1.
*Initial Screen
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MTART'.
perform bdc_field using 'BDC_OKCODE'
'=AUSW'.
perform bdc_field using 'RMMG1-MATNR'
ITAB-MATNR.
perform bdc_field using 'RMMG1-MBRSH'
'M'.
perform bdc_field using 'RMMG1-MTART'
'HALB'.
**********************Views*********************************
*Select Views
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(17'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_field using 'MSICHTAUSW-KZSEL(09)'
'X'.
perform bdc_field using 'MSICHTAUSW-KZSEL(12)'
'X'.
perform bdc_field using 'MSICHTAUSW-KZSEL(13)'
'X'.
perform bdc_field using 'MSICHTAUSW-KZSEL(14)'
'X'.
perform bdc_field using 'MSICHTAUSW-KZSEL(15)'
'X'..
perform bdc_field using 'MSICHTAUSW-KZSEL(17)'
'X'.
**********************Views*********************************
*perform bdc_dynpro using 'SAPLMGMM' '0070'.
*perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
*perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_dynpro using 'SAPLMGMM' '0070'.
*perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(17)'.
*perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_field using 'MSICHTAUSW-KZSEL(17)'
ITAB-KZSEL_17_011.
*perform bdc_dynpro using 'SAPLMGMM' '0070'.
*perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
*perform bdc_field using 'BDC_OKCODE'
'/00'.
*perform bdc_dynpro using 'SAPLMGMM' '0070'.
*perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(13)'.
*perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
*perform bdc_field using 'MSICHTAUSW-KZSEL(13)'
ITAB-KZSEL_13_012.
*Org Data
perform bdc_dynpro using 'SAPLMGMM' '0080'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-LGORT'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RMMG1-WERKS'
ITAB-WERKS.
perform bdc_field using 'RMMG1-LGORT'
ITAB-LGORT.
*Basic 1
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'=SP09'.
perform bdc_field using 'MAKT-MAKTX'
ITAB-MAKTX.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MARA-MATKL'
ITAB-MATKL.
perform bdc_field using 'MARA-BISMT'
ITAB-BISMT.
perform bdc_field using 'MARA-SPART'
ITAB-SPART.
perform bdc_field using 'MARA-MTPOS_MARA'
'NORM'.
perform bdc_field using 'BDC_CURSOR'
'MARA-NTGEW'.
perform bdc_field using 'MARA-BRGEW'
ITAB-BRGEW.
perform bdc_field using 'MARA-GEWEI'
ITAB-GEWEI.
perform bdc_field using 'MARA-NTGEW'
ITAB-NTGEW.
*Purchasing
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP12'.
perform bdc_field using 'MAKT-MAKTX'
ITAB-MAKTX.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MARC-EKGRP'
ITAB-EKGRP.
perform bdc_field using 'MARA-MATKL'
ITAB-MATKL.
perform bdc_field using 'BDC_CURSOR'
'MARA-EKWSL'.
perform bdc_field using 'MARA-EKWSL'
ITAB-EKWSL.
*MRP 1
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP13'.
perform bdc_field using 'MAKT-MAKTX'
ITAB-MAKTX.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MARC-EKGRP'
ITAB-EKGRP.
perform bdc_field using 'MARC-DISMM'
ITAB-DISMM.
perform bdc_field using 'MARC-DISPO'
ITAB-DISPO.
perform bdc_field using 'BDC_CURSOR'
'MARC-DISLS'.
perform bdc_field using 'MARC-DISLS'
ITAB-DISLS.
IF ITAB-DISLS EQ 'EX' .
perform bdc_field using 'MARC-BSTMI'
ITAB-BSTMI."MIN LOT SIZE
perform bdc_field using 'MARC-BSTMA'
ITAB-BSTMA."MAX LOT SIZE
perform bdc_field using 'MARC-BSTRF'
ITAB-BSTRF."RNDING
ELSEIF ITAB-DISLS EQ 'FX'.
perform bdc_field using 'MARC-BSTFE'
ITAB-BSTFE.
ENDIF.
*MRP 2
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP14'.
perform bdc_field using 'MAKT-MAKTX'
ITAB-MAKTX.
perform bdc_field using 'MARC-BESKZ'
ITAB-BESKZ.
perform bdc_field using 'MARC-LGPRO'
ITAB-LGPRO.
perform bdc_field using 'MARC-DZEIT'
ITAB-DZEIT.
perform bdc_field using 'MARC-PLIFZ'
ITAB-PLIFZ.
perform bdc_field using 'MARC-FHORI'
ITAB-FHORI.
perform bdc_field using 'BDC_CURSOR'
'MARC-EISBE'.
perform bdc_field using 'MARC-EISBE'
ITAB-EISBE.
*MRP 3
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP15'.
perform bdc_field using 'MAKT-MAKTX'
ITAB-MAKTX.
perform bdc_field using 'MARC-PERKZ'
ITAB-PERKZ.
perform bdc_field using 'MARC-VRMOD'
ITAB-VRMOD.
perform bdc_field using 'MARC-VINT1'
ITAB-VINT1.
perform bdc_field using 'MARC-VINT2'
ITAB-VINT2.
perform bdc_field using 'BDC_CURSOR'
'MARC-MTVFP'.
perform bdc_field using 'MARC-MTVFP'
ITAB-MTVFP.
*MRP 4
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP17'.
perform bdc_field using 'MAKT-MAKTX'
ITAB-MAKTX.
perform bdc_field using 'MARC-SBDKZ'
ITAB-SBDKZ.
perform bdc_field using 'BDC_CURSOR'
'MARC-SFEPR'.
perform bdc_field using 'MARC-SAUFT'
ITAB-SAUFT.
perform bdc_field using 'MARC-SFEPR'
ITAB-SFEPR.
*Work Scheduling
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP24'.
perform bdc_field using 'MAKT-MAKTX'
ITAB-MAKTX.
perform bdc_field using 'BDC_CURSOR'
'MARC-SFCPF'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MARC-FEVOR'
ITAB-FEVOR.
perform bdc_field using 'MARC-LGPRO'
ITAB-LGPRO.
perform bdc_field using 'MARC-SFCPF'
ITAB-SFCPF.
perform bdc_field using 'MARC-DZEIT'
ITAB-DZEIT.
*Check for Conversation Factor
if ITAB-MEINS ne iTAB-ausme and iTAB-umren gt 0
and iTAB-umrez gt 0.
perform bdc_dynpro using 'SAPLMGMM' '0510'.
perform bdc_field using:
'BDC_OKCODE' '=ENTR',
'RMMZU-UMREN' ITAB-UMREN,
'RMMZU-UMREZ' ITAB-UMREZ.
endif.
perform bdc_field using 'MARC-LGPRO'
itab-LGPRO.
perform bdc_field using 'MARC-DZEIT'
itab-DZEIT.
*Accounting
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP26'.
perform bdc_field using 'MAKT-MAKTX'
ITAB-MAKTX.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MARA-SPART'
ITAB-SPART.
perform bdc_field using 'BDC_CURSOR'
'MBEW-STPRS'.
perform bdc_field using 'MBEW-BKLAS'
ITAB-BKLAS.
perform bdc_field using 'MBEW-VPRSV'
ITAB-VPRSV.
perform bdc_field using 'MBEW-STPRS'
ITAB-STPRS.
IF ITAB-VPRSV = 'S'.
perform bdc_field using 'MBEW-STPRS' "FILLS STD PRICE
ITAB-VERPR.
ELSEIF ITAB-VPRSV ='V'.
perform bdc_field using 'MBEW-VERPR' "FILLS VALUE
ITAB-VERPR.
ENDIF.
*Cost Estimate
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'MAKT-MAKTX'
ITAB-MAKTX.
perform bdc_field using 'BDC_CURSOR'
'MARC-PRCTR'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MBEW-EKALR'
ITAB-EKALR.
perform bdc_field using 'MARC-LOSGR'
ITAB-LOSGR.
perform bdc_transaction using 'MM01'.
REFRESH BDCDATA.
else.
w_record = w_record + 1.
endif.
ENDLOOP.
ENDFORM.
form Upload.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = ' '
FILETYPE = ' '
TABLES
DATA_TAB = ITAB
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7.
ENDFORM.
form batch_job.
uline.
format color col_heading.
if w_trecord gt 0.
Write:/ 'Background Job has been Created for ',
w_trecord right-justified, 'Semi-Fin', 80 ''.
write:/ 'Please follow the following steps to run this job',
80 ''.
write:/ 'as listed below.', 80 ''.
format color col_normal.
skip.
write:/05 '1.Goto Transaction SM35', 80 ''.
write:/05 '2.Select your Session Name', 80 ''.
write:/05 '3.Click On Execute Button', 80 ''.
endif.
if w_record gt 0.
format color col_negative.
write:/ w_record ,'records already existed', 80 ''.
format color off.
endif.
uline.
endform.
regards,
srinivas
<b>*reward for useful answers*</b>
Similar Messages
-
Regarding bdc(views problem in mm01 while uploading the data)
hi experts,
i have coded a bdc in which i m using mm01 and extending the material to the different plant ,but here in some cases depending upon the material the views get changed for solving this i have to deselect and again select the views which i want and also i have to provide the valuation type for this material, so plz suggest me how to rectifie the views problem.......Ravi,
Do one thing.Develop some temporary BDC programs for different material with required views.
Finally develop a final program.In that internal table loop ,put case statement on material
when 'mat1' .
take the relevant code from above temporary progarms and copy here.
when '2'.
endcase.
At last delete all temporary programs.
Hope your problem will get solved
Don't forget to reward if useful. -
Problem in BDC with ( MM01-Dynamic views )
HI
I am working with BDC on material Mater(mm01).
Now while Creating Material,there is option of selecting different views based on MaterialType.
But while recording a BDC i can record it for a particular Material Type.and can select view associated to that particular Material Type.
Is there any solution to create a bdc progarm which can accept a new material based on
any material type and having views on user's choice that are given by user in Input file.
FOr that i think i need to create dynamic views and screen elements for input associated to those views.
After scanning some sites and forums for this particular problem,i got some help on this:-----
<b>SELECTION_VIEWS_FIND</b> should be very useful in this case.
There are three FModules totally involved:
a) <b>T130M_SINGLE_READ</b>
Pass TCODE = MM01, and get T130M values
b) <b>BILDSEQUENZ_IDENTIFY</b>
Pass KZRFB = 'X',TCODE_REF=T130M-TRREF and get
BILDSEQUENZ values
c) <b>SELECTION_VIEWS_FIND</b>
Pass BILDSEQUENZ and T130M-PSTAT
Now, this function module holds the values of all the views and the next screen numbers
But i am unable to interpret the solution..Can somebody Elaborate on this.or provide me some other solution for this.
Thanks in Advance
Help Will be appreciated.Yes, I agree with Christian. You are gonna want to use the BAPI or the underlying function module. It works good and isn't really that complex. Here is sample program. Here the function module is being used to change data, it can also be used to create, you will have to change the Tcode from MM02 to MM01.
report zrich_0001.
data: i_mara type table of mara_ueb with header line.
data: i_marc type table of marc_ueb with header line.
data: i_marcx type table of marc with header line.
parameters: p_matnr type mara-matnr,
p_plifz type marc-plifz.
start-of-selection.
* Get all plants for that material
select * into corresponding fields of table i_marcx
from marc where matnr = p_matnr.
* Now maintain data for each plant
loop at i_marcx.
* Reset I_Mara to new material number
clear i_mara. refresh i_mara.
select * into corresponding fields of table i_mara
from mara where matnr = p_matnr.
read table i_mara index 1.
i_mara-tcode = 'MM02'.
i_mara-tranc = '0000000001'.
modify i_mara index 1.
* Get Plant Data
clear i_marc. refresh i_marc.
select * into corresponding fields of table i_marc
from marc where matnr = i_marcx-matnr
and werks = i_marcx-werks.
read table i_marc index 1.
i_marc-plifz = p_plifz. " Plan Del time
i_marc-tranc = '0000000001'.
modify i_marc index 1.
* Maintain material
perform MATERIAL_MAINTAIN_DARK'.
endloop.
* MATERIAL_MAINTAIN_DARK
form MATERIAL_MAINTAIN_DARK.
* Variable for "Maintain_Material_Dark" Function Module
data: numerror like tbist-numerror.
data: last_matnr type mara-matnr.
data: i_delfields type table of mfieldres with header line.
data: i_errors type table of merrdat with header line.
call function 'MATERIAL_MAINTAIN_DARK'
exporting
sperrmodus = ' '
kz_prf = 'W'
max_errors = ' '
p_kz_no_warn = 'X'
kz_verw = 'X'
kz_aend = 'X'
kz_dispo = 'X'
kz_test = ' '
flag_muss_pruefen = ' '
call_mode = 'ACT'
importing
number_errors_transaction = numerror
matnr_last = last_matnr
tables
amara_ueb = i_mara "Basic Data
* amakt_ueb = i_makt "Descriptions
amarc_ueb = i_marc "Plant
* amard_ueb = i_mard "Storage Location
* AMFHM_UEB = I_MFHM "Production Tools
* amarm_ueb = i_marm "Units of Measure
* AMEA1_UEB = I_MEA1 "Internal Mangagement - EANs
* ambew_ueb = i_mbew "Accounting/Costing
* asteu_ueb = i_steu "Tax Data
* astmm_ueb = i_steumm "Tax Data
* AMLGN_UEB = I_MLGN "Warehouse Data
* AMLGT_UEB = I_MLGT "Storage Type Data
* AMPGD_UEB = I_MPGD "Change Documents
* AMPOP_UEB = I_MPOP "Forcast Parameters
* AMVEG_UEB = I_MVEG "Total Consumption Data
* AMVEU_UEB = I_MVEU "Unplanned Consumption Data
* amvke_ueb = i_mvke "Sales Data
* altx1_ueb = i_ltx1 "Sales Text
* AMPRW_UEB = I_MPRW "Forcast Values
amfieldres = i_delfields
amerrdat = i_errors
exceptions
kstatus_empty = 01
tkstatus_empty = 02
t130m_error = 03
internal_error = 04
update_error = 05
too_many_errors = 06.
if sy-subrc <> 0.
rollback work.
call function 'DEQUEUE_ALL'.
else.
commit work and wait.
call function 'DEQUEUE_ALL'.
endif.
clear: i_mara, i_marc.
refresh: i_mara, i_marc.
endform.
Regards,
Rich Heilman -
How to find the position of view in MM02 transaction for coding BDC?
Hi Guys,
Is there any FM or BAPI Available to find the position of the view in MM02 transaction. I tried FM SELECTION_VIEWS_FIND. But getting inconsistent results
i.e Some materials it is giving correct positions but for others i am getting wrong position. So my BDC is getting failed.
Thanks in advance.
Vinod.Hi,
data : i_t133a like t133a occurs 0 with header line,
ch(1),
viewno(2) type n.
clear viewno.
select * from t133a into corresponding fields of table i_t133a
where bilds = '21' and guifu like 'SP%' .
loop at i_t133a .
ch = i_t133a-pstat.
if mara-vpsta na ch .
delete i_t133a .
continue .
endif .
endloop.
sort i_t133a by guifu ascending .
loop at i_t133a .
viewno = viewno + 1 .
if i_t133a-guifu = 'SP01'. "FOR BASIC DATA1 CHANGES ACCORDINGLY REFER TABLE T133A TO FIND VTHE VALUE
exit .
endif .
endloop .
reward if usefull -
How can we handle view position in bdc
can any body tell me how to handle view position in bdc
Hi
It seems u want to handle views from dictionary.....thats why u have posted a question in this forum. Just post the question in the appropriate forum for BDC...
and by the way, there are a lot of cases which need to be handled in BDC....so, please be more clear on your question.....
Reward points if useful
Regards -
Bdc for MM01 with classification view
Hi all,
I need to create materials using mm01 with classification view. since there is no bapi supporting this view, i am ding by bdc.
The problem is in classification view once i give the class type and name a screen pops with caption
characteristic value assignment, but theere are no charateristics displayed - wat values do i have to enter here >
once i leave this screen the characteristics show up one after the other and i can load the details. but then while tryin to save error comes staing incnsisitent value assigned. wat do i ener in the intermediate screen t avoid this error.
thankshi when you are creating a classification view with characteristics.. you need to do all at once... you cannot modify..
all you can do is delete the whole view and create with all the changed again.. I dont memorize the BAPI .. but you have BAPIdelete.. BAPIadd.. -
Problem in BDC FOR uploading more than 1 insep. typ in QM view for MM01
Hi,
I had made a BDC in which i am trying to upload the data for the QM view which is being extended in it but the problem is when the program reaches the to QM view it is only able to upload only 1 inspection Type which is working fine but when there is more than 1 it gives error that its QM View has already maintained. Please provide me guiddlines how to solve this problem .
Here's is the link to the code which i am trying to modify:-
http://docs.google.com/Edit?id=dngp529_2fxwgmrgg
Edited by: ricx .s on Apr 16, 2009 2:30 PMhi,
But is it not possible that while creating the insepction type for the first it should simultaneously take the value of 2nd inspection type .
see,ina bdc of qp01 or ca01 we can insert the values at the screen but why can't we do d same in the bdc of mm01,
I had made a bdc for tcode MM02 in which i am able to upload the data but in that there is a problem that some of the materials have the Quality managmnt View at position no. 11 or 13 of the screen.
here's is d link for the code of the program :-
http://docs.google.com/Doc?id=dngp529_3wcgnjdf3
plzz provide me guidelines how to solve it .
Edited by: ricx .s on Apr 17, 2009 9:26 AM
Edited by: ricx .s on Apr 17, 2009 10:56 AM -
BDC Recording of Forecasting View of MM01
Hi Everyone,
I've been working on a BDC to upload consumption values in the Forecasting View of MM01.When there are more than 11 line items then we have to scroll the "TABLE CONTROL". But Page Down does not work in this BDC. The Code that's being used for Page Down in this TABLE CONTROL is "PB09". I've also tried using various codes like P++ etc. I've recorded many MM01 times but could not get a concrete answer.How to get this Page Down work?
Any Inputs will be very helpful.
Regards
Ramky.GHi,
Better to use following function module
BAPI_MATERIAL_SAVEDATA
if you find it is usefule , just reward me points
Thanks
Ramesh -
hai,
i have a problem in selecting views for multi user run,i will explain here,while recording a transaction in bdc for example take mm01 transaction when u record first u will be selecting the views which u need for the data batch process run so when one user runs the recording and saves it when another user runs the same recording the views order in the views selection may change so how can one constrain the views order to a particular way irrespective of user ,means who ever be the user once the views order is selcted the same order shoul be taken by all users so kindly help me in thiss problemHi.....
We should not select the views by scrolling ...need to select views using PgDn button then it could work fine for any User..
Please do close the thread if your problem solves..
regards,
sg -
REgarding view selection in mm02 while using bdc
hi,
i m using function module 'MATERIAL_BTCI_SELECTION_NEW'' for selecting the single view automatically in bdc,its working fine..but for another scenario i have to select the multiple views so for this what sud i do i how cud i pass multiple views in single parameter 'selection'.
plz help me.
thnx in advance.We had to make a BDC recently for multiple views. For most of them we used BAPI_MATERIAL_SAVEDATA, but there are some views which are not available (Accounting 2 for example).
For others there are some other BAPIs, as BAPI_MATINSPCTRL_SAVEREPLICA for Quality Management, or BAPI_OBJCL_CHANGE fo Classification.
Anyway, for those views that need to be filled using BDC, the better way we have seen is to select at the beginning of BDC the Basic Data 1 view (which is always at the top of the list and is not dependent of the views that are available for a particular material) and then navigate between views with the following OK_CODEs:
Basic data 1 = SP01
Basic data 2 = SP02
External Objects = SP03
Classification = SP04
Sales: Sales Org. Data 1 = SP05
Sales: Sales Org. Data 2 = SP06
Sales: General/Plant Data = SP07
Foreign Trade: Export Data = SP08
Sales and Distribution Text = SP09
Purchasing = SP10
Foreign Trade: Import Data = SP11
Purchase order text = SP12
MRP 1 = SP13
MRP 2 = SP14
MRP 3 = SP15
MRP 4 = SP16
Forecast = SP17
Work scheduling = SP18
Production resources and tools = SP19
General Plant Data / Storage 1 = SP20
General Plant Data / Storage 2 = SP21
Warehouse Management 1 = SP22
Warehouse Management 2 = SP23
Quality Management = SP24
Accounting 1 = SP25
Accounting 2 = SP26
Cost Estimate 1 = SP27
Costing 2 = SP28
Plant stock = SP29
Storage location stock = SP30 -
REgarding view selection mm02 in bdc
hi,
i m usung function module 'MATERIAL_BTCI_SELECTION_NEW'' for selecting the single view automatically in bdc,its working fine..but for another scenario i have to select the multiple views so for this what sud i do i how cud i pass multiple views in single parameter 'selection'.
plz help me.
thnx in advance.
nullWe had to make a BDC recently for multiple views. For most of them we used BAPI_MATERIAL_SAVEDATA, but there are some views which are not available (Accounting 2 for example).
For others there are some other BAPIs, as BAPI_MATINSPCTRL_SAVEREPLICA for Quality Management, or BAPI_OBJCL_CHANGE fo Classification.
Anyway, for those views that need to be filled using BDC, the better way we have seen is to select at the beginning of BDC the Basic Data 1 view (which is always at the top of the list and is not dependent of the views that are available for a particular material) and then navigate between views with the following OK_CODEs:
Basic data 1 = SP01
Basic data 2 = SP02
External Objects = SP03
Classification = SP04
Sales: Sales Org. Data 1 = SP05
Sales: Sales Org. Data 2 = SP06
Sales: General/Plant Data = SP07
Foreign Trade: Export Data = SP08
Sales and Distribution Text = SP09
Purchasing = SP10
Foreign Trade: Import Data = SP11
Purchase order text = SP12
MRP 1 = SP13
MRP 2 = SP14
MRP 3 = SP15
MRP 4 = SP16
Forecast = SP17
Work scheduling = SP18
Production resources and tools = SP19
General Plant Data / Storage 1 = SP20
General Plant Data / Storage 2 = SP21
Warehouse Management 1 = SP22
Warehouse Management 2 = SP23
Quality Management = SP24
Accounting 1 = SP25
Accounting 2 = SP26
Cost Estimate 1 = SP27
Costing 2 = SP28
Plant stock = SP29
Storage location stock = SP30 -
Selection view in MM02 BDC program
Hi Experts,
I am doing BDC Session method for Tcode MM02.There i am getting selection View screen for different material.But if i select a material in Sales view i need to select Sales :Sales org dAta.
It's coming third position.
But for some material it's coming fourth view.
If i record bdc in third position it'll take third view some other. how i can select the view in selection view.
Please,Anybody knows give me the suggestion.
Thanks & Regards,
NandhaHi,
use this Function module <b>SELECTION_VIEWS_FIND</b> to find the view position.
This One of functional modules for those who still has to use BDC for Material Master transactions (MM01 and MM02). Allows to determine line number for desired view in the "Select View(s)" window, to prepare BDC for the view access
Find the positon of the View based on this function module and write the code to select that perticular view.
Hope this solves your problem
Thanks
Sudheer -
How to overcome view changes in bdc session method using recording ?
how to overcome view changes in bdc session method using recording ?
ex-for mm01 in recording if i selected views basic data1 and basic data2.
i seheduleded for background for after 3 days .
if any body changes views by selecting other views also.
how to overcome this with out programming ?
is there any settings ?Hi,
I am attaching few threads.Hope these will help you.
If there are any error records in session, all those error records will get poulated in log .SM35 and after the session is completed , u can see error records which can be corrected and reprocessed again
We have the structures BDCLD and BDCLM, which will capture the log details inthe session. Firstly, sesssion should be processed. After that log will be created. Then caputure the information into an internal table using BDCLM and BDCLD.
and refer the link.
error correction in bdc session
regards
Madhu -
How to handle views in material master while doing BDC
Hi,
I am doing BDC for three material types and the views are different for all the three types. Please anyone tell me how to handle the views for all these three material types.
Thanks in advance.Hi,
Refer following code which i have used for MRP 1-2-3-4 view selection
CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'
EXPORTING
MATERIAL = IT_UPLOAD-MATNR " Material number
MATERIALART = GI_MARA-MTART " Material Type
SELECTION = 'D' " PSTAT(maintenance status) value for MRP.
TCODE = 'MM01' " Tcode where view's are called.
TABLES
BTCI_D0070 = IT_BDCDATA_VIEW
EXCEPTIONS
MATERIAL_NOT_FOUND = 1
MATERIAL_NUMBER_MISSING = 2
MATERIAL_TYPE_MISSING = 3
MATERIAL_TYPE_NOT_FOUND = 4
NO_ACTIVE_DYNPRO_SELECTED = 5
NO_AUTHORITY = 6
OTHERS = 7.
READ TABLE IT_BDCDATA_VIEW WITH KEY FVAL = 'X'.
IF SY-SUBRC = 0.
V_SELECTION = IT_BDCDATA_VIEW-FNAM.
VAR = IT_BDCDATA_VIEW-FNAM+17(2).
CONCATENATE 'MSICHTAUSW-KZSEL(' VAR ')' INTO VAR1."MRP1
PERFORM BDC_FIELD USING VAR1 "'MSICHTAUSW-KZSEL(12)'
'X'.
VAR = VAR + 1.
CONCATENATE 'MSICHTAUSW-KZSEL(' VAR ')' INTO VAR1."MRP1
PERFORM BDC_FIELD USING VAR1 "'MSICHTAUSW-KZSEL(13)'
'X'.
VAR = VAR + 1.
CONCATENATE 'MSICHTAUSW-KZSEL(' VAR ')' INTO VAR1."MRP1
PERFORM BDC_FIELD USING VAR1 "'MSICHTAUSW-KZSEL(14)'
'X'.
VAR = VAR + 1.
CONCATENATE 'MSICHTAUSW-KZSEL(' VAR ')' INTO VAR1."MRP1
PERFORM BDC_FIELD USING VAR1 "'MSICHTAUSW-KZSEL(15)'
'X'.
Regards,
Pritish -
Hi all,
I am performing BDC on MM02 to change MRP2 data.
I have used SELECTION_VIEWS_FIND to get the correct view. It works fine on my screen as i have access to all the views in MM02.
But when the user runs, it errors out as the user is restricted to only MRP view.
How do i get my BDC working based on user view?
Points will rewarded for helpful ansHi Ramesh babu, user has mrp view and my program also uses mrp view.
But the problem is my program when uses the FM SELECTION_VIEWS_FIND, it considers almost all view and the MRP 2 view is at 12 position say, but since user has only mrp view MRP 2 is at position 2 and hence mismatch. Now how do i get the current position of view in my program based on the user view?
Maybe you are looking for
-
How to read data in a program from a MAINTENANCE View
Hi Experts, Requirement: 1. I have maintained a maintenance view on three Database tables. 2.Data can be entered in the view as it is a Maintenace view as i have created maintenance generator for that and it is a requirement. 3. In one of my programs
-
LDAP design question for multiple sites
LDAP design question for multiple sites I'm planning to implement the Sun Java System Directory Server 5.2 2005Q1 for replacing the NIS. Currently we have 3 sites with different NIS domains. Since the NFS over the WAN connection is very unreliable, I
-
Help to create a pdf from an AutoCAD drawing
Hi - I need to create pdf's from AutoCAD drawings using the following specifications: use an AutoCAD defined plot style maintain layers (and preferrably order them alphabetically) maintain text searchability within the document (do not change text to
-
After loading the Groupon App to my Storm 9550, I keep getting the message "No network connections is available. Please turn on the mobile or wifi connections." I have checked the connections...they're on. Uninstalled and reinstalled...no help.
-
Can i upload ebook to cloud then link to my website
i need a url www etc to link page creator ebook to my website