TSW-Ticket Creation & Actualization using BDC
Hi,
I am using BDC for Ticket creation using transaction O4TEN.
After execution of this BDC, Ticket get created and Saved but it does not actualize ticket even if we click actualize button using BDC.
In real scenario, after ticket creation the status and substatus values should be "C"(Planned) and "6" (Complete) but in this case the status and substatus values are "B"(Checked) and "4"(Positive).
If we create ticket directly using O4TEN then it actualizes ticket properly.
I am not able to find out why BDC is not actualizing tickets.
Any idea?
Regards,
Umesh
Hi,
I tried BDC for SAVE but still not getting Ticket Key.
So now I am using FM: OIJ_EL_A_TICKETS_MAINTAIN_N.
It creates ticket but in Ticket Item table Ticket item field is blank. Purpose is blank.
Also OIJ_EL_TKT_I_O1 and OIJ_EL_TKT_I_O2 are not populated.
In header I am passing: TICKET_PURPOSE, TICKET_TYPE, UPDKZ = 'I'
and In item I am passing: NOMNR, NOMTK, NOMIT, MENGE, MEINS, TIME_ST_LOAD_STA, TIME_ST_LOAD_END, BUDAT UPDKZ = 'I'.
am I missing something?
Code is as follows:
Replace BDC with function module: OIJ_EL_A_TICKETS_MAINTAIN_N
1) Call FM: OIJ_EL_A_TICKETS_MAINTAIN_N
2) Call FM: ENQUEUE_E_OIJTKT
3) Call FM: OIJB_GENERATE_DOCUMENTS_N
4) Call FM: DEQUEUE_E_OIJTKT
DATA: ls_tkt_h TYPE roij_el_ticket_hvb,
ls_tkt_i TYPE roij_el_ticket_i_io,
ls_oijnomi TYPE oijnomi,
ls_roijnomiio TYPE roijnomiio,
ls_ticket_item TYPE oij_el_ticket_i,
ls_ticket_item_o1 TYPE oij_el_tkt_i_o1,
ls_ticket_item_o2 TYPE oij_el_tkt_i_o2,
ls_ticket_header_pv TYPE oij_el_ticket_h,
ls_ticket_header TYPE oij_el_ticket_h,
ls_tkt_i_o1 TYPE oij_el_tkt_i_o1,
ls_tkt_i_o2 TYPE oij_el_tkt_i_o2.
DATA: lv_time TYPE sy-uzeit.
DATA: it_tkt_i TYPE roij_el_ticket_i_io_t,
it_tkt_h_evt TYPE roijte_t,
it_tkt_h_evt_txt TYPE oij_txt,
it_tkt_i_evt TYPE roijte_t,
it_tkt_i_evt_txt TYPE oij_txt,
it_tkt_i_o1 TYPE roij_el_tkt_i_o1_t,
it_tkt_i_o2 TYPE roij_el_tkt_i_o2_t,
it_tkt_err_log TYPE oij_el_err_log_tt,
it_tkt_doc_flow TYPE roij_el_doc_flow_io_t,
it_return TYPE bapiret2_t,
it_oijnomh TYPE oijnomh_t,
it_oijnomi TYPE oijnomi_t,
it_ticket_item TYPE STANDARD TABLE OF oij_el_ticket_i,
it_ticket_item_o1 TYPE STANDARD TABLE OF oij_el_tkt_i_o1,
it_ticket_item_o2 TYPE STANDARD TABLE OF oij_el_tkt_i_o2.
ls_tkt_h-ticket_purpose = '1'.
ls_tkt_h-ticket_type = lv_ticket_type.
IF lv_ticket_type EQ c_yp2.
If Ticket type is YP2 then
ls_tkt_h-yy_mct_cat = fp_mct_cat.
ENDIF.
ls_tkt_h-yy_pat_alc = lv_alloc_rule.
ls_tkt_h-updkz = 'I'.
ls_tkt_i-nomnr = fp_s_tc1-nomnr.
ls_tkt_i-nomtk = fp_s_tc1-nomtk.
ls_tkt_i-nomit = fp_s_tc1-nomit.
ls_tkt_i-menge = lv_menge.
ls_tkt_i-meins = fp_s_tc1-units.
CLEAR ls_oijnomi.
SELECT SINGLE * FROM oijnomi INTO ls_oijnomi
WHERE nomtk = fp_s_tc1-nomtk
AND nomit = fp_s_tc1-nomit.
IF sy-subrc EQ 0.
MOVE-CORRESPONDING ls_oijnomi TO ls_roijnomiio.
ENDIF.
PERFORM get_timestamp USING fp_sdate
lv_time
ls_roijnomiio
CHANGING ls_tkt_i-time_st_load_sta.
PERFORM get_timestamp USING fp_edate
lv_time
ls_roijnomiio
CHANGING ls_tkt_i-time_st_load_end.
CONCATENATE lv_budat(4) lv_budat5(2) lv_budat8(2) INTO ls_tkt_i-budat.
ls_tkt_i-updkz = 'I'.
APPEND ls_tkt_i TO it_tkt_i.
CALL FUNCTION 'OIJ_EL_A_TICKETS_MAINTAIN_N'
EXPORTING
is_tkt_header = ls_tkt_h
IT_HEADER_EVT =
IT_HEADER_EVT_TXT =
it_items = it_tkt_i
IT_ITM_EVT =
IT_ITM_EVT_TXT =
IT_ITM_O1 =
IT_ITM_O2 =
IT_TKT_ERROR_LOG =
it_tkt_doc_flow = it_tkt_doc_flow
iv_commit = 'X'
IV_LOCK =
IV_ADD_TO_LOG =
IV_CALL_TO_OUTPUT =
IMPORTING
es_tkt_header = ls_tkt_h
ET_HEADER_EVT = it_tkt_h_evt
ET_HEADER_EVT_TXT = it_tkt_h_evt_txt
et_items = it_tkt_i
ET_ITM_EVT = it_tkt_i_evt
ET_ITM_EVT_TXT = it_tkt_i_evt_txt
et_itm_o1 = it_tkt_i_o1
et_itm_o2 = it_tkt_i_o2
ET_TKT_ERROR_LOG = it_tkt_err_log
et_tkt_doc_flow = it_tkt_doc_flow
et_return = it_return
EXCEPTIONS
ticket_locked = 1
OTHERS = 2
IF sy-subrc NE 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
COMMIT WORK AND WAIT.
Lock the ticket
There is no check neccessary if the ticket has already
been locked by an other user because it has just been
created.
CALL FUNCTION 'ENQUEUE_E_OIJTKT'
EXPORTING
mode_oij_el_ticket_h = 'E'
mandt = sy-mandt
ticket_key = ls_tkt_h-ticket_key
ticket_version = ls_tkt_h-ticket_version
ticket_purpose = ls_tkt_h-ticket_purpose
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
CALL FUNCTION 'OIJB_GET_NOMINATION_DATA'
EXPORTING
ACTIVITY =
is_ticket_header = ls_tkt_h
is_ticket_item = ls_tkt_i
IV_ADD_TO_LOG =
CHANGING
ct_oijnomh = it_oijnomh
ct_oijnomi = it_oijnomi
RETURN =
EXCEPTIONS
ticket_data_error = 1
no_nomination_selected = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ls_ticket_header = ls_tkt_h.
LOOP AT it_tkt_i INTO ls_tkt_i.
MOVE-CORRESPONDING ls_tkt_i TO ls_ticket_item.
APPEND ls_ticket_item TO it_ticket_item.
ENDLOOP.
LOOP AT it_tkt_i_o1 INTO ls_tkt_i_o1.
MOVE-CORRESPONDING ls_tkt_i_o1 TO ls_ticket_item_o1.
APPEND ls_ticket_item_o1 TO it_ticket_item_o1.
ENDLOOP.
LOOP AT it_tkt_i_o2 INTO ls_tkt_i_o2.
MOVE-CORRESPONDING ls_tkt_i_o2 TO ls_ticket_item_o2.
APPEND ls_ticket_item_o2 TO it_ticket_item_o2.
ENDLOOP.
CALL FUNCTION 'OIJB_GENERATE_DOCUMENTS_N'
EXPORTING
i_ticket_header = ls_ticket_header
i_ticket_header_pv = ls_ticket_header_pv
I_CLOSE_SHIPMENT = ' '
TABLES
t_ticket_item = it_ticket_item
t_ticket_item_o1 = it_ticket_item_o1
t_ticket_item_o2 = it_ticket_item_o2
T_TICKET_ITEM_PV =
T_TICKET_ITEM_O1_PV =
T_TICKET_ITEM_O2_PV =
t_oijnomh = it_oijnomh
t_oijnomi = it_oijnomi
T_DOC_FLOW =
T_ERR_LOG =
T_REVERSAL_DOCS =
T_ORIGINAL_DOCS =
T_TICKET_SUBITEM =
EXCEPTIONS
error_during_cip_process = 1
error_during_checks = 2
nomination_lock_error = 3
nomination_read_error = 4
cip_process_read_error = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
COMMIT WORK AND WAIT.
ENDIF.
Similar Messages
-
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 -
Material Creation Using BDCs.
Hi all,
I have developed a program for Material Creation using BDC.
Material is Being created and that is working well and good.Here i have a Requirement to update the Newly creted material in Ztable.So when i use call transaction mathod,i have written code for updation under the line CALL TRANSACTION.where in iam getting newly creatde material from MARA table,and so it is working perfectly fine..
But our requirement should be sessions method,so when i use sessions method and exeute the program..we face the problem of updation.
the piece of code for updation is updating previously created material.
Literally speaking only the sessions are created ,when the program is executed,material is not created when program is run.Material is only created when the sessions are processed using SM35,
So how should i do here,where should be the updation code written and where will we get the newly created material in sessions method..
Pls Help me in solving this problemhai priyanaka it might be due to configuration problem
bcos manulay also ur gettign this , so just consult ur MM consultant for soem setting
regards
afzal -
Billng document creation using bdc
hi experts,
I've been using bapi for sales order and outbound delivery creation. But for billing document i'm using BDC. it's simpler. The creation of sales order and outbound delivery has no problem. The problem is upon creation of the billing document, it only creates the last entry in the item level. Example, if item has 10,20, and 30; it will only create item 30 in the billing document level. But no problem with the sales order and outdel. What could i be missing here?
Thank you in advance!Hi,
Im actually not very particular on where in the bdc code the line items are being processed. the only variable that I see here is the outbound del number which is g_odnum. Here is the BDC code.
f_bdc_dynpro 'SAPMV60A' '0102'.
f_bdc_field 'BDC_CURSOR' 'KOMFK-VBELN(01)'.
f_bdc_field 'BDC_OKCODE' '/00'.
f_bdc_field 'KOMFK-VBELN(01)' g_odnum.
f_bdc_dynpro 'SAPMV60A' '0104'.
f_bdc_field 'BDC_CURSOR' 'VBRK-FKART'.
f_bdc_field 'BDC_OKCODE' '=SICH'.
f_bdc_transaction 'VF01'.
Can you help me identify where it is in this BDC code?
Thanks for you help! -
Creation of po with mutiple line items using BDC
Hi Gurus,
Can any body hav notes for creating po's using BDC with multiple line items in transaction ME21. I hav created po for single line item but if i tried to create multiple line items, it ll create multiple po's...
thanks in advance
arunSee the Below Logic for me22 and it is also same for me21
report zpochange.
data : i_error like bdcmsgcoll occurs 0 with header line.
data : i_bdcdata like bdcdata occurs 0 with header line.
tables : ekko, ekpo.
data :c1(10) value 'ME22',
c2(1) value ',',c3(10).
data : var1(20). " LIKE EKKO-EBELN.
data : var2 like ekko-ebeln.
data : begin of i_ekko occurs 0,
header(2),
ebeln like ekko-ebeln,
end of i_ekko.
data : begin of i_ekpo occurs 0,
item(2),
ebeln like ekpo-ebeln,
ebelp like ekpo-ebelp,
menge(10), " LIKE EKPO-MENGE,
end of i_ekpo.
data : v like ekpo-ebelp.
data: begin of itab occurs 0,
text(300),
end of itab.
parameters: p_file like ibipparms-path.
*PARAMETERS: PONUMBER LIKE EKPO-EBELN.
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
importing
file_name = p_file
start-of-selection.
*SELECT EBELN FROM EKKO INTO TABLE I_EKKO WHERE EBELN = PONUMBER.
SELECT EBELN EBELP MENGE FROM EKPO INTO TABLE I_EKPO WHERE EBELN
*= PONUMBER.
perform get_data.
*LOOP AT ITAB.
WRITE :/ ITAB.
ENDLOOP.
loop at itab.
var1 = itab-text+0(1).
if var1 = 'H'.
*I_EKKO-EBELN = ITAB-TEXT.
split itab at c2 into i_ekko-header
i_ekko-ebeln.
SPLIT ITAB AT ',' INTO I_EKKO-EBELN.
" I_EKPO-EBELP
" I_EKPO-MENGE
" var1.
append i_ekko.
else.
split itab at c2 into i_ekpo-item
i_ekpo-ebeln
i_ekpo-ebelp
i_ekpo-menge.
append i_ekpo.
endif.
*var2 = i_ekpo-ebeln.
MOVE VAR1 TO I_EKPO-EBELN.
MOVE VAR1 TO I_EKKO-EBELN.
APPEND: I_EKPO.
*if not var1 is initial.
split var1 at ',' into i_ekpo-ebelp
i_ekpo-menge.
i_ekpo-ebeln = var2.
append i_ekpo.
*endif.
endloop.
loop at i_ekpo.
write :/ i_ekpo.
endloop.
loop at i_ekko.
perform fill_data. " TABLES I_EKPO.
endloop.
LOOP AT I_EKPO.
WRITE :/ I_EKPO.
ENDLOOP.
*& Form GET_DATA
text
--> p1 text
<-- p2 text
*LOOP AT I_ERROR.
WRITE :/ I_ERROR.
ENDLOOP.
form get_data.
call function 'WS_UPLOAD'
exporting
codepage = ' '
filename = p_file
filetype = 'ASC'
headlen = ' '
line_exit = ' '
trunclen = ' '
user_form = ' '
user_prog = ' '
dat_d_format = ' '
IMPORTING
FILELENGTH =
tables
data_tab = itab
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.
endform. " GET_DATA
*& Form FILL_DATA
text
-->P_I_EKPO text
form fill_data. " tables i_ekpo .
perform bdcscreen using 'SAPMM06E' '0105'.
perform bdcfield using 'RM06E-BSTNR' i_ekko-ebeln.
perform bdcfield using 'BDC_OKCODE' '/00'.
loop at i_ekpo where ebeln = i_ekko-ebeln.
V = I_EKPO-EBELP.
perform bdcscreen using 'SAPMM06E' 0120.
perform bdcfield using 'BDC_CURSOR' 'RM06E-EBELP'.
perform bdcfield using 'RM06E-EBELP' i_ekpo-ebelp.
perform bdcfield using 'BDC_OKCODE' '/00'.
perform bdcscreen using 'SAPMM06E' 0120.
perform bdcfield using 'BDC_CURSOR' 'EKPO-MENGE(01)'.
perform bdcfield using 'RM06E-EBELP' i_ekpo-ebelp.
perform bdcfield using 'EKPO-MENGE(01)' i_ekpo-menge.
perform bdcfield using 'BDC_OKCODE' '/00'.
*PERFORM BDCSCREEN USING 'SAPMM06E' 0120.
*PERFORM BDCFIELD USING 'BDC_CURSOR' 'RMO6E-EBELP'.
*CLEAR V.
endloop.
perform bdcfield using 'BDC_OKCODE' '=BU'.
call transaction c1 using i_bdcdata mode 'A'
messages into i_error.
refresh i_bdcdata.
endform. " FILL_DATA
*& Form BDCSCREEN
text
-->P_0140 text
-->P_0120 text
form bdcscreen using p_program p_screen.
i_bdcdata-program = p_program.
i_bdcdata-dynpro = p_screen.
i_bdcdata-dynbegin = 'X'.
append i_bdcdata.
clear i_bdcdata.
endform. " BDCSCREEN
*& Form BDCFIELD
text
-->P_0145 text
-->P_I_EKPO_EBELN text
form bdcfield using fnam fval.
i_bdcdata-fnam = fnam.
i_bdcdata-fval = fval.
append i_bdcdata.
clear i_bdcdata.
endform. " BDCFIELD
Reward Points if it is helpful
Thanks
Seshu -
Creation of PO using BDC with ME21N - Urgent
Hi All,
My requirement is to create a Purchase Order using BDC. I'm using ME21N for BDC. I did recording and using that recording I wrote a program for BDC. BDC table is populated correctly, but while calling ME21N using call transaction, program is cuming back to the selection screen, without creating PO. And sy-subrc value after call transaction is '0'. Please let me know the problem.
Thanks in Advance.
Siva Sankar.Hi,
Put a break point after the call transaction statement(i.e, put break point on sy-subrc check)
and then check the message table.
if call transaction is suceessfull u will find a success messages in the I_messages table.
Regards,
Sriram -
Contract creation using BDC wherein Net order price is Zero
Hi,
Please let me know the solution to the above problem.
I am trying to create a quantity contract using BDC but the Net Order Price is coming as Zero even though the condition type PB00 is maintained properly in the info record with some net order price which is not equal to zero.
Please let me know asap as this is a critical issue. The same problem is not happening if i try an create a contract manually.Hi,
Please let me know the solution to the above problem.
I am trying to create a quantity contract using BDC but the Net Order Price is coming as Zero even though the condition type PB00 is maintained properly in the info record with some net order price which is not equal to zero.
Please let me know asap as this is a critical issue. The same problem is not happening if i try an create a contract manually. -
Profile Creation in BW using BDC
Hi,
Is it possible to create profiles in BW using BDC's?
Thanks,
SujaThanks a lot.
Have you tried this?
I did everything that is mentioned in the document. I can also see the profile generated successfully. But when I run the report is doesnt apply the necessary restriction.
I created a cube which has material,customer,invoice,date and 2 measures.I restricted Material to a single value as explained in the document.In Su01 it shows the correct values.But the query still runs for all the material values. I have omitted the heirarchy part of this document.Would that be the reason?
Any input on this would be veryh helpful. Thanks again.
Suja -
Creating Sales order texts while using BDC session method is not working
Hi All,
I have an existing program which creates sales order using BDC session method.( Actual program uses BAPI to create sales order and in case if any error occurs during creation of sales order BDC session is generated so that user can process it later and i am facing issues in this part of code where it uses BDC)
I wanted to modify this BDC sesion to update the sales order text also. I tried recording VA01 for creationg sales order text unfortunatly it is not capturing the data i am entering in the text fields.
Please suggest if there is any way to create sales order using BDC.
Regards
SheebaHi Madhu,
'=TP_CREATE' is the OK code i am getting for creating TEXTS. But the text entered are not captured in BDC.
Part of BDC program generated for cretaing sales order texts.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 128 22'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=TP_CREATE'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 128 22'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=TP_CREATE'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
Regards,
Sheeba -
Inbound for Service ticket creation
Dear all,
An inbound FM being triggered for Service ticket creation which those info are coming from legacy system.
My requirement is, at the end of the inbound processing, i need to send back the newly created SAP ticket number back to legacy.
I found that during the Inbound FM execution, it just hold a new GUID where the actual ticket number has not been determined/populated yet (i noticed, actual SAP ticket number will only be populated after the execution of Inbound FM). For this case, i can not get the new SAP ticket number send back to legacy during the Inbound processing.
Do you have any ideas on how can i get the newly created SAP ticket number during the Inbound FM execution?
Your comments are highly appreaciated.
Thanks in advance.cud u plz tell me function module ur using for inbound process for creating service ticket..
thanks in advance .. -
Wht r the advantages of using bdc rathan than lsmw?
Hi , I want to knwo.. wht r the advangtages of using bdc rathan than lsmw.,,,
Hi,
LSMW and BDC are vastly different.
BDC (Batch Data Communication) is a technology used for data transfer.
it is meant for transferring data thru SAP transactions itself. when u use BDC for data transfer,
the sequence of steps is the same as when u use standard sap transaction screens for data upload. the only difference is that u can use different options for foreground/background processing.
LSMW on the other hand is a tool that helps migrate data from a legacy system (non-sap system ) to SAP system.
it offers u various options to use either batch input, direct input, BAPIs or idocs.
it involves a series of some 17-18 steps to migrate data.
BDC:
Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system
or from a non-SAP system to SAP System.
Features :
BDC is an automatic procedure.
This method is used to transfer large amount of data that is available in electronic medium.
BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
BDC uses normal transaction codes to transfer data.
Types of BDC :
CLASSICAL BATCH INPUT (Session Method)
CALL TRANSACTION
BATCH INPUT METHOD:
This method is also called as CLASSICAL METHOD.
Features:
Asynchronous processing.
Synchronous Processing in database update.
Transfer data for more than one transaction.
Batch input processing log will be generated.
During processing, no transaction is started until the previous transaction has been written to the database.
CALL TRANSACTION METHOD :
This is another method to transfer data from the legacy system.
Call transaction.
1) asynchronous processing
2) can transfer small amount of data
3) processing is faster.
4) errors need to be handled explicitly
5) data is updated automatically
Session method.
1) synchronous processing.
2) can tranfer large amount of data.
3) processing is slower.
4) error log is created
5) data is not updated until session is processed.
Session method is to populate the data by filling BDC structure
and keep as session to process from SM37 to post in appropriate Transaction.
Call transaction method is to post the data directly into the Transaction from an Executable program.
Features:
Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
Updating the database can be either synchronous or asynchronous. The program specifies the update type.
Transfer data for a single transaction.
Transfers data for a sequence of dialog screens.
No batch input processing log is generated.
For BDC:
http://myweb.dal.ca/hchinni/sap/bdc_home.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
http://www.sap-img.com/abap/learning-bdc-programming.htm
http://www.sapdevelopment.co.uk/bdc/bdchome.htm
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
LSMW:
The LSM Workbench is an R/3-based tool that supports You when transferring data from non-SAP systems ("Legacy Systems") to R/3 once or periodically.
The tool supports conversion of data of the legacy system in a convenient way. The data can then be imported into the R/3 system via batch input, direct input, BAPIs or IDocs.
Furthermore, the LSM Workbench provides a recording function that allows to generate a "data migration object" in an entry or change transaction.
The main advantages of the LSM Workbench:
Part of R/3 and thus independent of individual platforms
A variety of technical possibilities of data conversion:
Data consistency due to standard import techniques:
Batch input
Direct input
BAPIs (Business Application Programming Interfaces)
IDocs (Intermediate Documents)
The import technique to be used in an individual case depends on the business object.
Generation of the conversion program on the basis of defined rules
Clear interactive process guide
Interface for data in spreadsheet format
Creation of data migration objects on the basis of recorded transactions
Charge-free for SAP customers and SAP partners
http://help.sap.com/saphelp_nw04s/helpdata/en/87/f3ae74e68111d1b3ff006094b944c8/content.htm
http://www.sap-img.com/sap-data-migration.htm
http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
http://allsaplinks.com/lsmw.html
http://myweb.dal.ca/hchinni/sap/lsmw_home.htm
some more links
BDC
http://www.sap-img.com/bdc.htm
LSMW
http://www.sap-img.com/sap-data-migration.htm
http://www.sapgenie.com/saptech/lsmw.htm
http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-17643ed1d6d658821_glossary
Thanks. -
Error while create TSW ticket processing for DES Scenario
Hi Experts ,
I am facing an error while doing TSW - ticketing process for DES scenario
For STO creation under movement type O - Origin T - Transfer.An error is coming while actualizing the ticket
Error states : " you do not have authority to access the shipment ( Return code 4)
Request all experts to look into the issue and kindly reply
Thanks in AdvanceHi,
Error states : " you do not have authority to access the shipment ( Return code 4)
It seems authorization problem,kindly take help of basis team for authorization
kapil -
Hi Experts,
Can anybody send me BDC sample code for Sales order item level Table Control. Plz send me asap. It's urgent.
RajHi Raj,
If you are generating the code for the Recording for sales order creation, then the BDC population will have the constant values only.
You need to modify the values that are passed to the BDC structures with the fields in your ITAB.
For example,
loop at t_res_item_recs.
perform bdc_dynpro using 'SAPLV69A' '9000'.
perform bdc_field using 'BDC_OKCODE'
'=V69A_KONY'.
perform bdc_field using 'KOMV-KBETR(01)'
t_res_item_recs-shp_chg.
perform bdc_field using 'KOMV-KBETR(02)'
t_res_item_recs-accsr_chg.
perform bdc_field using 'KOMV-KBETR(03)'
t_res_item_recs-fuel_schg.
perform bdc_field using 'KOMV-KBETR(04)'
t_res_item_recs-frt_rt_ttl.
endloop.
call transaction 'VI02' using t_bdcdata
"mode 'N'
"update 'S'
options from gs_options
messages into t_messages.
form bdc_dynpro using p_program
p_dynpro.
t_bdcdata-program = p_program.
t_bdcdata-dynpro = p_dynpro.
t_bdcdata-dynbegin = 'X'.
append t_bdcdata.
clear t_bdcdata.
endform. " bdc_dynpro
form bdc_field using p_fnam
p_fval.
t_bdcdata-fnam = p_fnam.
t_bdcdata-fval = p_fval.
append t_bdcdata.
clear t_bdcdata.
endform. " bdc_field
Regards,
Ravi -
Data upload for vendor balances using BDC
hi abap experts,
I have a requirement on data uploading using BDC.
For the vendor balances ie. for transaction FBL1N ( I was given a template for vendor balance upload and need to write a BDC program for that ) I need upload the exsisting transaction data to the system. is recording necessary for this?
can u pls help me with step by step process for vendor balance uploading.
Thanks,
Hema.Hi
Please follow the following Steps:
Steps for recording:
Step1: Goto TCODE SHDB
Step2: Click on New Recording
Step3: Give the necessary Details such as TOCDE, Desc, ...
Step4: Do the screen by screen recording.(Please avoid extra screen to appear)
Step5: Save the recording.
Step6. Select the recording and click on Program button on toolbar.
Step7: Give the Program name and click on radio button Transfer from recording.
Step 8: It will open a new session with SE38 and a program with the recoding.
Step 9: then just add the basic code for BDC.
Regards,
Lokesh -
I want in LSMW SAME CODING. THIS IS USING BDC CALL TRANSACTION
REPORT ZXX_BDC_PRA NO STANDARD PAGE HEADING LINE-COUNT 20
LINE-SIZE 150 .
Program Name :ZXX_BDC_PRA *
Object Id : *
Develper Name : praveen *
Start Date : 25.06.07 *
Description : uploading flat file to sap system *
*--structure for Data Uploading.
DATA: BEGIN OF IT_STR ,
VKORG LIKE RF02D-VKORG,
VTWEG LIKE RF02D-VTWEG,
SPART LIKE RF02D-SPART,
KTOKD LIKE RF02D-KTOKD,
NAME1 LIKE KNA1-NAME1,
SORTL LIKE KNA1-SORTL,
ORT01 LIKE KNA1-ORT01,
PSTLZ LIKE KNA1-PSTLZ,
LAND1 LIKE KNA1-LAND1,
SPRAS LIKE KNA1-SPRAS,
END OF IT_STR.
*--Internal Table for Data Uploading.
DATA: ITAB LIKE IT_STR OCCURS 0.
*--Internal Table to sucessfull Records.
DATA: ITAB1 LIKE IT_STR OCCURS 0.
*--Internal Table to Store Error Records.
DATA: ITAB2 LIKE STANDARD TABLE OF IT_STR WITH HEADER LINE.
*--Internal Table for Storing the BDC data.
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*--Internal Table for storing the messages.
DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA: COUNT TYPE I VALUE 1,
S VALUE 0, E VALUE 0.
Selection screen *
SELECTION-SCREEN BEGIN OF BLOCK b1
WITH FRAME TITLE TEXT-001.
PARAMETERS: P_FILE TYPE IBIPPARMS-PATH.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
*functionality to use drill down list
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
IMPORTING
FILE_NAME = P_FILE.
Start-of-selection *
START-OF-SELECTION.
DATA FILENAME TYPE STRING.
FILENAME = P_FILE.
*-- Form to upload flatfile data into the internal table.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FILENAME
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB
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
OTHERS = 17.
*--Generating the BDC table for the fields of the internal table.
LOOP AT ITAB INTO IT_STR.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0107'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RF02D-KTOKD'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RF02D-VKORG'
IT_STR-VKORG.
PERFORM BDC_FIELD USING 'RF02D-VTWEG'
IT_STR-VTWEG.
PERFORM BDC_FIELD USING 'RF02D-SPART'
IT_STR-SPART.
PERFORM BDC_FIELD USING 'RF02D-KTOKD'
IT_STR-KTOKD.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0110'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNA1-SPRAS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'KNA1-NAME1'
IT_STR-NAME1.
PERFORM BDC_FIELD USING 'KNA1-SORTL'
IT_STR-SORTL.
PERFORM BDC_FIELD USING 'KNA1-ORT01'
IT_STR-ORT01.
PERFORM BDC_FIELD USING 'KNA1-PSTLZ'
IT_STR-PSTLZ.
PERFORM BDC_FIELD USING 'KNA1-LAND1'
IT_STR-LAND1.
PERFORM BDC_FIELD USING 'KNA1-SPRAS'
IT_STR-SPRAS.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0120'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNA1-TXJCD'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0125'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNA1-NIELS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0360'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0310'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNVV-BEGRU'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02D' '0324'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'KNVP-PARVW(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
*--Calling the transaction 'Vd01'.
CALL TRANSACTION 'VD01' USING BDCDATA MODE 'N' UPDATE 'S'
MESSAGES INTO MESSTAB.
PERFORM MESSAGES.
REFRESH : BDCDATA, MESSTAB.
ENDLOOP.
END-OF-SELECTION.
*--Populating the Success records internal table.
IF ITAB1[] IS NOT INITIAL.
format color 5.
WRITE: /'SUCCESSFUL RECORDS'.
format color off.
LOOP AT ITAB1 INTO IT_STR.
WRITE:/ IT_STR-VKORG,IT_STR-VTWEG,
IT_STR-SPART,IT_STR-KTOKD,
IT_STR-NAME1,IT_STR-SORTL,
IT_STR-ORT01,
IT_STR-PSTLZ,
IT_STR-LAND1,
IT_STR-SPRAS.
S = S + 1.
ENDLOOP.
REFRESH : ITAB1.
WRITE:/ 'TOTAL RECORDS',S.
ENDIF.
*--Populating the error records internal table.
IF ITAB2[] IS NOT INITIAL.
FORMAT COLOR 3.
WRITE :/ 'ERRORS RECORDS ARE'.
FORMAT COLOR OFF.
LOOP AT ITAB2.
WRITE:/ ITAB2-VKORG,
ITAB2-VTWEG,
ITAB2-SPART,ITAB2-KTOKD,
ITAB2-NAME1,ITAB2-SORTL,
ITAB2-ORT01,
ITAB2-PSTLZ,
ITAB2-LAND1,
ITAB2-SPRAS.
E = E + 1.
ENDLOOP.
REFRESH : ITAB2.
WRITE: / 'TOTAL RECORDS',E.
REFRESH : ITAB2.
ENDIF.
End of Selection *
END-OF-SELECTION.
TOP-OF-PAGE *
TOP-OF-PAGE.
WRITE:/ SY-ULINE.
WRITE:/10 'REPORT ID',21 SY-REPID,35 'USERNAME',46 SY-UNAME,
60 'SYSTEM DATE',70 SY-DATUM,80 'SYSTEM TIME',90 SY-UZEIT,
100 'PAGE NO',108 SY-PAGNO.
WRITE:/ SY-ULINE.
FOrm to Populate the BDC table.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> SPACE.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM. "BDC_FIELD
*& Form messages
FORM MESSAGES .
LOOP AT MESSTAB.
IF MESSTAB-MSGTYP = 'I'.
WRITE : / MESSTAB-MSGV1.
ELSEIF
MESSTAB-MSGTYP = 'S'.
INSERT LINES OF ITAB FROM COUNT TO COUNT INTO TABLE ITAB1 .
COUNT = COUNT + 1.
WRITE : / MESSTAB-MSGV1.
ELSEIF
MESSTAB-MSGTYP = 'E'.
INSERT LINES OF ITAB FROM COUNT TO COUNT INTO TABLE ITAB2.
COUNT = COUNT + 1.
WRITE : / MESSTAB-MSGV1.
ENDIF.
ENDLOOP.
ENDFORM. " messagesHi
Go through the doc and do the same using LSMW
BDC is the way to transfer data by writing a batch input program which can use either session or call transaction method.
LSMW used to transfer data without/less code.
What type of data we transfer using LSMW?
LSMW is best suited for transferring master data.
Actually BDC and LSMW are not comparable at all.
for example LSMW itself can use BDC as a way of mass data transfer.
BDC is a mass data transfer technique via screen logic of existing SAP Data entry transactions. It behaves as if you are manually making thousand of entires into sap system as a background job. And that is probably the reason why BAPI's are preffered over BDC's.
On the other hand LSMW is a tool to facilitate DATA migration from other legacy systems ... It contains step by step procedure for data migration.
Like Managing Data Migration Projects , Creating Source Structures , Mapping Source structures wid Target structures , etc etc
LSMW internally might well be using the following techniqes for data transfer..
1. IDOX
2. Direct Input / BDC
4. BAPI's
LSMW is an encapsulated data transfer tool. It can provide the same functionality as BDC infact much more but when coming to techinical perspective most the parameters are encapulated. To listout some of the differences :
LSMW is basicaly designed for a fuctional consultant who do not do much coding but need to explore the fuctionality while BDC is designed for a technical consultant.
LSMW offers different techinque for migrating data: Direct input ,BAPI,Idoc,Batch input recording. While bdc basically uses recording.
LSMW mapping is done by SAP while in BDC we have to do it explicitly .
LSMW is basically for standard SAP application while bdc basically for customized application.
Coding can be done flexibly in BDC when compared to LSMW
1. Maintain Attributes:
Here you have to choose the second option and you can do the recording how this should work. Then assign the same to the Batch Input Recording name.
2. Maintain Source structure:
Create a structure name
3. Maintain Source field:
In this you have to create a structure same as that of the input file
eg: name
age
4. Maintain structure relations:
This will link the structure to the input file.
5. Maintain field mapping and conversion rules:
Here is the place where you can do coding, depending upon the code you have written or assignment you have done the values will get picked up from the file and get processed.
6. Maintain field mapping and conversion rules:
If you have any fixed values you can define here.
7. Specify files:
Specify the input file path and type.
8. Assign files:
This will assign ur file to the Input file
9. Read Data:
This will read ur data from teh file.
10. Dispaly Read Data:
You can see the uploaded data
11. Convert Data
This will convert the data to the corresponding format for processing
12. Display Converted data:
13. Create batch input session
Here this will create a batch input session for processing
14. Run Batch Input session:
By clicking on the session and process the same you can do teh needfu.
http://www.sapbrain.com/TOOLS/LSMW/SAP_LSMW_steps_introduction.html
http://esnips.com/doc/8e732760-5548-44cc-a0bb-5982c9424f17/lsmw_sp.ppt
http://esnips.com/doc/f55fef40-fb82-4e89-9000-88316699c323/Data-Transfer-Using-LSMW.zip
http://esnips.com/doc/1cd73c19-4263-42a4-9d6f-ac5487b0ebcb/LSMW-with-Idocs.ppt
http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI.ppt
http://esnips.com/doc/7582d072-6663-4388-803b-4b2b94d7f85e/LSMW.pdf
for Long texts Upload
Please take a look at this..
http://help.sap.com/saphelp_erp2005/helpdata/en/e1/c6d30210e6cf4eac7b054a73f8fb1d/frameset.htm
Reward points for useful Answers
Regards
Anji
Maybe you are looking for
-
IPad no longer working with my HP wireless printer
My HP LaserJet CP1525NW Color printer was working flawlessly with my iPad Air and now no longer works. Any suggestions?
-
Recording Itunes videos to DVD
My husband and I just downloaded a TV show from Itunes in the hopes of copying it to DVD for our use. However, the burn command on Itunes is grey when I want to do this. How can we do this? Thanks for your support!
-
Can't do detailed line chart in cfchart
Hi is it possible to get a line chart suitable for say a financial series ie with ~1000 points of data in cfchart with CFMX7? I cant seem to get the line fine enough so have to limit chart to say 50 points. Someone must have done it but cant see any
-
ORA-01041 hostdef extension doesnt exist during Oracle 9.0.1.1.1 install
Installing Oracle 9.0.1.1.1 with all default values on Windows 2000 Server SP2 gets the following errors during "Creating and Starting Oracle instance" in the Database Configuration Assistant: ORA-01041 internal error: hostdef extension doesn't exist
-
BPC 10.1 Unified Environment
Hello Experts, My client has some questions around unified environment.Please help me understand it better 1) If we have a bpc model exactly same in classic environment and an unified environment,Will the model in unified environment be faster in per