Bdc and smartforms
hi experts,
can u plz send me few questions related to bdc n smartforms
thanks
Hi,
Refer this
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
Check these link:
http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
http://www.sap-img.com/abap/question-about-bdc-program.htm
http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
http://www.planetsap.com/bdc_main_page.htm
call Transaction or session method ?
http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
http://www.****************/InterviewQ/interviewQ.htm
http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
Reports
http://www.sapgenie.com/abap/reports.htm
http://www.allsaplinks.com/material.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
Check these step-by-step links
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
for Smartforms material
http://www.sap-basis-abap.com/sapsf001.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.ossincorp.com/Black_Box/Black_Box_2.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sapgenie.com/abap/smartforms.htm
How to trace smartform
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
http://www.sap-img.com/smartforms/smart-006.htm
http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
Re: Need FAQ's
check most imp link
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
SAPScripts
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
SAP SCRIPT FIELDS
http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
scripts easy material
http://www.allsaplinks.com/sap_script_made_easy.html
Debugging Document.
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
BAPI
http://help.sap.com/saphelp_46c/helpdata/en/9b/417f07ee2211d1ad14080009b0fb56/frameset.htm
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
Checkout !!
http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sapgenie.com/abap/bapi/example.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
List of all BAPIs
http://www.planetsap.com/LIST_ALL_BAPIs.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://www.sappoint.com/abap/bapiprg.pdf
http://www.sappoint.com/abap/bapiactx.pdf
http://www.sappoint.com/abap/bapilst.pdf
http://www.sappoint.com/abap/bapiexer.pdf
http://service.sap.com/ale
http://service.sap.com/bapi
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
Remote Function Call:
RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.
RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.
RFCs manage the communication process, parameter transfer and error handling.
http://help.sap.com/saphelp_47x200/helpdata/en/22/042860488911d189490000e829fbbd/frameset.htm.
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
Refer this
http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
http://www.****************/InterviewQ/interviewQ.htm
http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
http://www.techinterviews.com/?p=198
http://www.techinterviews.com/?p=326
http://www.sap-img.com/abap/answers-to-some-abap-interview-questions.htm
http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
http://www.geekinterview.com/Interview-Questions/SAP-R-3/ABAP
http://sap.ittoolbox.com/documents/popular-q-and-a/abap-sample-interview-questions-3240
http://www.sap-img.com/abap/abap-interview-question.htm
http://www.allinterview.com/Interview-Questions/ABAP.html
Reward points if useful
Regards,
Himanshu
Similar Messages
-
Re:BDC,ALV,SCRIPTS and SMARTFORMS
Hi,
i need a complete BDC programming example codes with different methods, suppose if it is a material master mm01, i need the screen shots, what to fill in that transaction , the flat file data snapshot and program, so that i will do that example, otherwise iam so much confused
I also need ALV ,SAPSCRIPTS and smartforms realtime sample codes with screenshots so tht i will try directly .
Iam very thankful to all of them who helps me
Thanks & Regards,
Sravanthigopal
[email protected]** Program ID : ZMAT_CREATE
** Program Desc : Material Master Creation
** Process Overview
** Created Date : 22/08/2006
** Company Name :
REPORT ZMAT_CREATE
NO STANDARD PAGE HEADING LINE-SIZE 132 MESSAGE-ID ZBDCMSG.
Internal table definition *
DATA: BEGIN OF ITAB OCCURS 0,
MATNR LIKE RMMG1-MATNR, " Material Number
MBRSH LIKE RMMG1-MBRSH, " Industry Sector
MTART LIKE RMMG1-MTART, " Material Type
WERKS LIKE RMMG1-WERKS, " Plant
LGORT LIKE RMMG1-LGORT, " Storage Location
VKORG LIKE RMMG1-VKORG, " Sales Organization
VTWEG LIKE RMMG1-VTWEG, " Distribution Channel
LGNUM LIKE RMMG1-LGNUM, " Warehouse Number
LGTYP LIKE RMMG1-LGTYP, " Storage Type
MAKTX LIKE MAKT-MAKTX, " Material Description
MEINS LIKE MARA-MEINS, " Base Unit of Measure
MATKL LIKE MARA-MATKL, " Material Group
SPART LIKE MARA-SPART, " Division
MTPOS_MARA LIKE MARA-MTPOS_MARA, "General item category group
GEWEI LIKE MARA-GEWEI, " Weight Unit
TAXKM1 LIKE MG03STEUER-TAXKM, " Tax classification material
TAXKM2 LIKE MG03STEUER-TAXKM, " Tax classification material
KONDM LIKE MVKE-KONDM, " Material Pricing Group
MTPOS LIKE MVKE-MTPOS , "ItemCategoryGroupFromMaterialMaster
MTVFP LIKE MARC-MTVFP, " Checking Group for AvailabilityCheck
TRAGR LIKE MARA-TRAGR, " Transportation group
LADGR LIKE MARC-LADGR, " Loading group
TDLINE LIKE RSTXT-TXLINE, " Text editor text line
EKGRP LIKE MARC-EKGRP, " Purchasing Group
DISMM LIKE MARC-DISMM, " MRP Type
BESKZ LIKE MARC-BESKZ, " Procurement Type
SOBSL LIKE MARC-SOBSL, " Special procurement type
PERKZ LIKE MARC-PERKZ, " Period indicator
PRMOD LIKE MPOP-PRMOD, " Forecast model
KZINI LIKE MPOP-KZINI, " Initialization indicator
AUTRU LIKE MARC-AUTRU, " Reset Forecast Model Automatically
MODAV LIKE MPOP-MODAV, " Model selection procedure
IPRKZ LIKE MARA-IPRKZ, " Period indicator for shelf life expiration date
BWTTY LIKE MBEW-BWTTY, " Valuation Category
BKLAS LIKE MBEW-BKLAS, " Valuation Class
EKLAS LIKE MBEW-EKLAS, " Valuation Class for Sales OrderStock
VPRSV LIKE MBEW-VPRSV, " Price Control Indicator
EKALR LIKE MBEW-EKALR, "MaterialIsCostedWithQuantityStructure
END OF ITAB,
*// TEXT HEADER
GT_HEAD LIKE THEAD,
*// Text lines
GT_TEXT LIKE STANDARD TABLE OF TLINE,
GW_TEXT LIKE TLINE,
Data definition *
WS_REP_CNT(6) TYPE C,
SESSION(12) TYPE C.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
PARAMETERS:
PA_GROUP LIKE APQI-GROUPID OBLIGATORY DEFAULT 'MMupload',
PA_FNAME LIKE IBIPPARMS-PATH OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
Include statements *
INCLUDE ZBDCREX.
At Selection Screen definition *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_FNAME.
*//GETTING FLAT FILE PATH
PERFORM FILE_PATH USING PA_FNAME.
Start of Selection definition *
START-OF-SELECTION.
*//UPLOADING THE FLAT FILE
PERFORM DATA_UPLOAD TABLES ITAB USING PA_FNAME.
*// BDC OPEN GROUP
PERFORM OPEN_GROUP USING PA_GROUP.
SKIP 3.
FORMAT COLOR COL_HEADING INVERSE ON.
WRITE 40 TEXT-001.
FORMAT COLOR COL_HEADING INVERSE OFF.
SKIP 1.
FORMAT COLOR COL_NEGATIVE INVERSE ON.
WRITE :/3 TEXT-002, 13 SY-MANDT, 104 TEXT-003, 113 SY-UNAME,
/3 TEXT-004, 13 SY-DATUM, 104 TEXT-005, 113 SY-UZEIT.
FORMAT COLOR COL_NEGATIVE INVERSE OFF.
LOOP AT ITAB.
WS_REP_CNT = WS_REP_CNT + 1. "To Count no. of Records Processed
PERFORM MM_UPLOAD.
ENDLOOP.
*//STATUS INDICATION
IF SY-SUBRC = 0.
SESSION = PA_GROUP.
SKIP 1.
FORMAT COLOR COL_TOTAL INVERSE ON.
WRITE: /38 TEXT-006 , WS_REP_CNT.
FORMAT COLOR COL_TOTAL INVERSE OFF.
MESSAGE S000 WITH SESSION.
ENDIF.
*// BDC CLOSE GROUP
PERFORM CLOSE_GROUP.
SET PF-STATUS 'ZMM01PF'.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'SESSION'.
CALL TRANSACTION 'SM35'.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE SCREEN.
ENDCASE .
FORM MM_UPLOAD *
FORM MM_UPLOAD.
REFRESH BDCDATA.
*// Create Material: Initial Screen
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RMMG1-MATNR'
ITAB-MATNR.
perform bdc_field using 'RMMG1-MBRSH'
ITAB-MBRSH.
perform bdc_field using 'RMMG1-MTART'
ITAB-MTART.
*// Selection Views
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'SELA'.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
*// Organization Levels
perform bdc_dynpro using 'SAPLMGMM' '0080'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RMMG1-WERKS'
ITAB-WERKS.
perform bdc_field using 'RMMG1-LGORT'
ITAB-LGORT.
perform bdc_field using 'RMMG1-VKORG'
ITAB-VKORG.
perform bdc_field using 'RMMG1-VTWEG'
ITAB-VTWEG.
perform bdc_field using 'RMMG1-LGNUM'
ITAB-LGNUM.
perform bdc_field using 'RMMG1-LGTYP'
ITAB-LGTYP.
*// Basic Data 1: Screen
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'=SP04'.
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 'MARA-MTPOS_MARA'
ITAB-MTPOS_MARA.
perform bdc_field using 'BDC_CURSOR'
'MARA-GEWEI'.
perform bdc_field using 'MARA-BRGEW'
'9000'.
perform bdc_field using 'MARA-GEWEI'
ITAB-GEWEI.
perform bdc_field using 'MARA-NTGEW'
'8000'.
*// Sales: Sales Organization 1: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP05'.
perform bdc_field using 'MG03STEUER-TAXKM(01)'
ITAB-TAXKM1.
perform bdc_field using 'MG03STEUER-TAXKM(02)'
ITAB-TAXKM2.
perform bdc_dynpro using 'SAPLMGMM' '4200'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_OKCODE'
'=SP05'.
*// Sales: Sales Organization 2: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP06'.
perform bdc_field using 'BDC_CURSOR'
'MVKE-KONDM'.
perform bdc_field using 'MVKE-KONDM'
ITAB-KONDM.
perform bdc_field using 'MARA-MTPOS_MARA'
ITAB-MTPOS_MARA.
perform bdc_field using 'MVKE-MTPOS'
ITAB-MTPOS.
*// Sales: General / Plant Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP12'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MARA-BRGEW'
'9000'.
perform bdc_field using 'MARA-GEWEI'
ITAB-GEWEI.
perform bdc_field using 'MARA-XCHPF'
perform bdc_field using 'MARA-NTGEW'
'8000'.
perform bdc_field using 'MARC-MTVFP'
ITAB-MTVFP.
perform bdc_field using 'BDC_CURSOR'
'MARC-LADGR'.
perform bdc_field using 'MARA-TRAGR'
ITAB-TRAGR.
perform bdc_field using 'MARC-LADGR'
ITAB-LADGR.
*// MRP 1: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP13'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MARC-EKGRP'
ITAB-EKGRP.
perform bdc_field using 'BDC_CURSOR'
'MARC-DISMM'.
perform bdc_field using 'MARC-DISMM'
ITAB-DISMM.
*// MRP 2: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP14'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1_BEZ-WERKS_BEZ'.
perform bdc_field using 'MARC-BESKZ'
ITAB-BESKZ.
perform bdc_field using 'MARC-SOBSL'
ITAB-SOBSL .
*// MRP 3: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP16'.
perform bdc_field using 'BDC_CURSOR'
'MARC-PERKZ'.
perform bdc_field using 'MARC-PERKZ'
ITAB-PERKZ.
perform bdc_field using 'MARC-MTVFP'
ITAB-MTVFP.
*// Forecasting Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP17'.
perform bdc_field using 'BDC_CURSOR'
'MPOP-PRMOD'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MPOP-PRMOD'
ITAB-PRMOD.
perform bdc_field using 'MARC-PERKZ'
ITAB-PERKZ.
perform bdc_field using 'MPOP-PERAN'
'60'.
perform bdc_field using 'MPOP-ANZPR'
'12'.
perform bdc_field using 'MPOP-KZINI'
ITAB-KZINI.
perform bdc_field using 'MPOP-SIGGR'
'4.000'.
perform bdc_field using 'MARC-AUTRU'
ITAB-AUTRU.
perform bdc_field using 'MPOP-MODAV'
ITAB-MODAV.
*// Work Scheduling Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP19'.
perform bdc_field using 'BDC_CURSOR'
'MARC-FRTME'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
*// Plant data / Stor. 1: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP20'.
perform bdc_field using 'BDC_CURSOR'
'MAKT-MAKTX'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MARA-IPRKZ'
ITAB-IPRKZ.
*// Plant data / Stor. 2: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP21'.
perform bdc_field using 'BDC_CURSOR'
'MAKT-MAKTX'.
perform bdc_field using 'MARA-BRGEW'
'9000'.
perform bdc_field using 'MARA-GEWEI'
ITAB-GEWEI.
perform bdc_field using 'MARA-NTGEW'
'8000'.
*// Warehouse Management 1: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP23'.
perform bdc_field using 'BDC_CURSOR'
'MAKT-MAKTX'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MARA-BRGEW'
'9000'.
perform bdc_field using 'MARA-GEWEI'
ITAB-GEWEI.
*// Quality Management Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP24'.
perform bdc_field using 'BDC_CURSOR'
'MAKT-MAKTX'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
*// Accounting 1: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP26'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MBEW-BWTTY'
ITAB-BWTTY.
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-EKLAS'
ITAB-EKLAS.
perform bdc_field using 'MBEW-VPRSV'
ITAB-VPRSV.
perform bdc_field using 'MBEW-PEINH'
'1'.
perform bdc_field using 'MBEW-VERPR'
'800'.
perform bdc_field using 'MBEW-STPRS'
'800'.
*// Costing 1: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP27'.
perform bdc_field using 'BDC_CURSOR'
'MAKT-MAKTX'.
perform bdc_field using 'MARA-MEINS'
ITAB-MEINS.
perform bdc_field using 'MBEW-EKALR'
ITAB-EKALR.
perform bdc_field using 'MARC-LOSGR'
'1'.
*// Costing 2: Screen
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=BABA'.
perform bdc_field using 'BDC_CURSOR'
'MAKT-MAKTX'.
perform bdc_field using 'MBEW-BKLAS'
ITAB-BKLAS.
perform bdc_field using 'MBEW-BWTTY'
ITAB-BWTTY.
perform bdc_field using 'MBEW-EKLAS'
ITAB-EKLAS.
perform bdc_field using 'MBEW-VPRSV'
ITAB-VPRSV.
perform bdc_field using 'MBEW-PEINH'
'1'.
perform bdc_field using 'MBEW-VERPR'
'800.00'.
perform bdc_field using 'MBEW-STPRS'
'800.00'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
*//BDC INSERT
PERFORM BDC_TRANSACTION TABLES BDCDATA
USING 'MM01'. " MESSAGES INTO GT_MSG.
*// Text Header Data
CONCATENATE ITAB-MATNR ' 000101'
INTO GT_HEAD-TDNAME .
GT_HEAD-TDOBJECT = 'MVKE' .
GT_HEAD-TDID = '0001' .
GT_HEAD-TDSPRAS = SY-LANGU.
*// Sales Text
GW_TEXT-TDFORMAT = '00'.
GW_TEXT-TDLINE = ITAB-TDLINE .
APPEND GW_TEXT TO GT_TEXT.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = GT_HEAD
INSERT = 'X'
SAVEMODE_DIRECT = 'X'
OWNER_SPECIFIED = ' '
TABLES
LINES = GT_TEXT
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
SKIP 2.
FORMAT COLOR COL_NEGATIVE INVERSE ON.
WRITE: / 'Unable to Insert Salestext for Material : ', ITAB-MATNR .
FORMAT COLOR COL_NEGATIVE INVERSE OFF.
ENDIF.
CLEAR: GT_HEAD, GT_TEXT, GW_TEXT.
ENDFORM. "MM_UPLOAD
** Program ID : ZMAT_CREATE
** Program Desc : Material Master Creation Using BAPI
** Process Overview :
** Created By : P.KARTHIKEYAN
** Created Date : 17/08/2006
** Company Name : Infoview Technologies Limited
REPORT ZBAPI_MATERIAL_SAVETEXT LINE-SIZE 132 MESSAGE-ID ZMMBAPI.
*<<<DATA DECLEA FOR HEADER>>>>>>>>>>>>>>>>>>>>>>>>>>>>
****<<<<<Header segment with control information>>>>>>
DATA: HEADER LIKE BAPIMATHEAD.
*<<CLIENT DATA>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
*<<<<<<<<Client-specific material data>>>>>>>>>>>>>>>>
DATA: GT_CLIENTDATA LIKE BAPI_MARA.
**<<<<<<<<CLIENT DATA INITIAL>>>>>>>>>>>>>
**<<<<<<<<Information on update for CLIENTDATA>>>>>>>>
DATA: GT_CLIENTDATAX LIKE BAPI_MARAX.
***<<<<<PLANTDATA>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
**<<<<<<<Plant-specific material data>>>>>>>>>>>>>>>>>
DATA: GT_PLANTDATA LIKE BAPI_MARC.
**<<<<<<<<PLANT DATA INITIAL>>>>>>>>>>>>>>>
**<<<<<<<<Information on update for PLANTDATA>>>>>>>>
DATA:GT_PLANTDATAX LIKE BAPI_MARCX.
*<<<<<<<<<<<<<<<FORECASTPARAMETERS>>>>>>>>>>>>>>>>>>>
DATA: GT_FORECASTPARAMETERS LIKE BAPI_MPOP.
*<<<<<<<<<<<<<Information on update for FORECASTDATA>
*<<<<<<<<<<<<<<<FORECASTPARAMETERS DATA INTIAL>>>>>>>
DATA:GT_FORECASTPARAMETERSX LIKE BAPI_MPOPX.
*<<<<<<<<<<<<<<<PLANNING DATA >>>>>>>>>>>>>>>>>>>>>>
*<<<<<<<<<<<Information on update for PLANNINGDATA>>>
DATA:GT_PLANNINGDATA LIKE BAPI_MPGD.
*<<<<<<<<<<<<<<<PLANNING INITIAL >>>>>>>>>>>>>>>>>>>
DATA:GT_PLANNINGDATAX LIKE BAPI_MPGDX.
*<<<<<<<<<<<<<<<STORAGELOCATIONDATA>>>>>>>>>>
*<<<<<<<<<<<<Storage-location-specific material data>>
DATA: GT_STORAGELOCATIONDATA LIKE BAPI_MARD.
*<<<<<<Information on update for STORAGELOCATIONDATA>>
*<<<<<<<<<<<<<<<STORAGELOCATIONDATA INITIAL>>>>>>>>>>>
DATA:GT_STORAGELOCATIONDATAX LIKE BAPI_MARDX.
*<<<<<<<<<<<<<<<SALESDATA DATA >>>>>>>>>>>>>>>>>>>>>
DATA: GT_SALESDATA LIKE BAPI_MVKE.
*<<<<<<<<<<<<<<<Information on update for SALESDATA>>>
*<<<<<<<<<<<<<<<SALESDATA DATA INITIAL >>>>>>>>>>>>>>
DATA: GT_SALESDATAX LIKE BAPI_MVKEX.
****<<<<<<<<<<<<Units of measure>>>>>>>>>>>>>>>>>>>>>>>
*****<<<<<<<<<<<<<<<GT_UNITSOFMEASURE>>>>>>>>>>>>>>>>>>
DATA: GT_UNITSOFMEASURE LIKE BAPI_MARM OCCURS 0 WITH HEADER LINE.
*****<<<<<<<<<<<<<<<GT_UNITSOFMEASUREX>>>>>>>>>>>>>>>>>
DATA: GT_UNITSOFMEASUREX LIKE BAPI_MARMX OCCURS 0 WITH HEADER LINE.
*****<<<<<<<<<<<<<<<SALES TEXT>>>>>>>>>>>>>>>>>>>>>>>>>>
DATA: GT_MATERIALLONGTEXT LIKE BAPI_MLTX OCCURS 0 WITH HEADER LINE.
*****<<<<<<<<<<<<<<<MATERIAL_DESC>>>>>>>>>>>>>>>>>>>>>>>>>>
DATA: MATERIAL_DESC LIKE BAPI_MAKT OCCURS 0 WITH HEADER LINE.
*******<<<<<<<RETURN PARAMETERS>>>>>>>>
DATA: ITAB_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE. "#EC NEEDED
******<<<<<<<WAREHOUSENUMBERDATA>>>>>>>>>>>>>>
DATA: GT_WAREHOUSENUMBERDATA LIKE BAPI_MLGN.
******<<<<<<<WAREHOUSENUMBERDATA>>>>>>>>>>>>>>
DATA: GT_WAREHOUSENUMBERDATX LIKE BAPI_MLGNX.
******<<<<<<<STORAGETYPEDATA>>>>>>>>>>>>>>>>>>
DATA: GT_STORAGETYPEDATA LIKE BAPI_MLGT.
******<<<<<<<STORAGETYPEDATAX>>>>>>>>
DATA: GT_STORAGETYPEDATAX LIKE BAPI_MLGTX.
***<<<BAPI_TRANSCATION COMMIT>>>>>>>>>>>>>>>>>
DATA: GT_RETURN TYPE BAPIRET2. "#EC NEEDED
***<<<<<<<<Valuation data>>>>>>>>>>>>>>>>>>>>>
DATA: GT_VALUATIONDATA like BAPI_MBEW. "Valuation data
***<<<<<<<<Valuation data>>>>>>>>>>>>>>>>>>>>>
DATA: GT_VALUATIONDATAX like BAPI_MBEWX. "Valuation data
data: gt_PRTDATA like BAPI_MFHM OCCURS 0 WITH HEADER LINE.
data: gt_PRTDATAX like BAPI_MFHM OCCURS 0 WITH HEADER LINE.
**<<<<International Article Numbers (EANs)>>>>
DATA: GT_INTERNATIONALARTNOS LIKE BAPI_MEAN OCCURS 0 WITH HEADER LINE,
**<<<<Tax classifications>>>>>>>>>>>>>>>>>>>>>>
GT_TAXCLASSIFICATIONS LIKE BAPI_MLAN OCCURS 0 WITH HEADER LINE,
GT_RETURNMESSAGES LIKE BAPI_MATRETURN2 OCCURS 0 WITH HEADER LINE.
**<<<<<<<<<<<<<<FLAT FILE INTERNAL TABLE USED FOR DOWNLOAD EXCEL FILE>>>>>>
DATA: BEGIN OF GT_FT_ITAB OCCURS 0,
MATERIAL TYPE BAPIMATHEAD-MATERIAL , "Material Number
IND_SECTOR TYPE BAPIMATHEAD-IND_SECTOR, "Industry Sector
MATL_TYPE TYPE BAPIMATHEAD-MATL_TYPE , "Material Type
BASIC_VIEW TYPE BAPIMATHEAD-BASIC_VIEW, "Basic Data View
SALES_VIEW TYPE BAPIMATHEAD-SALES_VIEW , "Sales View
PURCHASE_VIEW TYPE BAPIMATHEAD-PURCHASE_VIEW, "Purchasing View
MRP_VIEW TYPE BAPIMATHEAD-MRP_VIEW ,"Material Requirements Planning (MRP) View
FORECAST_VIEW TYPE BAPIMATHEAD-FORECAST_VIEW , "Forecasting View
WORK_SCHED_VIEW TYPE BAPIMATHEAD-WORK_SCHED_VIEW ,"Work Scheduling View
PRT_VIEW TYPE BAPIMATHEAD-PRT_VIEW , "Production Resources/Tools (PRT) View
STORAGE_VIEW TYPE BAPIMATHEAD-STORAGE_VIEW , "Storage View
WAREHOUSE_VIEW TYPE BAPIMATHEAD-WAREHOUSE_VIEW , "Warehouse Management View
QUALITY_VIEW TYPE BAPIMATHEAD-QUALITY_VIEW, "Quality Management View
ACCOUNT_VIEW TYPE BAPIMATHEAD-ACCOUNT_VIEW , "Accounting View
COST_VIEW TYPE BAPIMATHEAD-COST_VIEW , "Costing View
*****<<<<<<<<CLIENT DATA>>>>>>>>>>>>>>>>>>>>
MATL_GROUP TYPE BAPI_MARA-MATL_GROUP, "Materialgroup
OLD_MAT_NO TYPE BAPI_MARA-OLD_MAT_NO, "Old material number
BASE_UOM TYPE BAPI_MARA-BASE_UOM, "Base Unit of Measure
BASE_UOM_ISO TYPE BAPI_MARA-BASE_UOM_ISO ,"Base unit of measure in ISO code
DOCUMENT TYPE BAPI_MARA-DOCUMENT, "Document number
DOC_TYPE TYPE BAPI_MARA-DOC_TYPE, "Document type
DOC_VERS TYPE BAPI_MARA-DOC_VERS, "Document version
DOC_FORMAT TYPE BAPI_MARA-DOC_FORMAT,"Page format of document
DOC_CHG_NO TYPE BAPI_MARA-DOC_CHG_NO, "Document change number
PAGE_NO TYPE BAPI_MARA-PAGE_NO, "Page number of document
PROD_MEMO TYPE BAPI_MARA-PROD_MEMO , "Production/Inspection Memo
PAGEFORMAT TYPE BAPI_MARA-PAGEFORMAT, "Page Format of Production Memo
SIZE_DIM TYPE BAPI_MARA-SIZE_DIM, "Size/dimensions
BASIC_MATL TYPE BAPI_MARA-BASIC_MATL, "Basic Material
STD_DESCR TYPE BAPI_MARA-STD_DESCR, "Industry Standard Description
DSN_OFFICE TYPE BAPI_MARA-DSN_OFFICE, "Laboratory/design office
NET_WEIGHT TYPE BAPI_MARA-NET_WEIGHT, " "Net weight
UNIT_OF_WT TYPE BAPI_MARA-UNIT_OF_WT, "Weight Unit
DIVISION TYPE BAPI_MARA-DIVISION, "Division
CAD_ID TYPE BAPI_MARA-CAD_ID, "Competitor
PROD_ALLOC TYPE BAPI_MARA-PROD_ALLOC, "Procurement rule
HAZMATPROF TYPE BAPI_MARA-HAZMATPROF, "Source of Supply
HIGH_VISC TYPE BAPI_MARA-HIGH_VISC, "Allowed packaging weight
LOOSEORLIQ TYPE BAPI_MARA-LOOSEORLIQ, "Long material number
PERIOD_IND_EXPIRATION_DATE TYPE BAPI_MARA-PERIOD_IND_EXPIRATION_DATE,"Expiration Dat
ITEM_CAT TYPE BAPI_MARA-ITEM_CAT, "General item category group
EXTMATLGRP TYPE BAPI_MARA-EXTMATLGRP, "External Material Group
*****CLIENT DATA INITIAL>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
MATL_GROUPX TYPE BAPI_MARAX-MATL_GROUP, "Materialgroup
OLD_MAT_NOX TYPE BAPI_MARAX-OLD_MAT_NO, "Old material number
BASE_UOMX TYPE BAPI_MARAX-BASE_UOM, "Base Unit of Measure
BASE_UOM_ISOX TYPE BAPI_MARAX-BASE_UOM_ISO, "Base unit of measure in ISO code
DOCUMENTX TYPE BAPI_MARAX-DOCUMENT, "Document number
DOC_TYPEX TYPE BAPI_MARAX-DOC_TYPE, "Document type
DOC_VERSX TYPE BAPI_MARAX-DOC_VERS, "Document version
DOC_FORMATX TYPE BAPI_MARAX-DOC_FORMAT,"Page format of document
DOC_CHG_NOX TYPE BAPI_MARAX-DOC_CHG_NO, "Document change number
PAGE_NOX TYPE BAPI_MARAX-PAGE_NO, "Production/Inspection Memo
PROD_MEMOX TYPE BAPI_MARAX-PROD_MEMO, "Page Format of Production Memo
SIZE_DIMX TYPE BAPI_MARAX-SIZE_DIM, "Size/dimensions
BASIC_MATLX TYPE BAPI_MARAX-BASIC_MATL, "Basic Material
STD_DESCRX TYPE BAPI_MARAX-STD_DESCR, "Industry Standard Description
DSN_OFFICEX TYPE BAPI_MARAX-DSN_OFFICE, "Laboratory/design office
NET_WEIGHTX TYPE BAPI_MARAX-NET_WEIGHT, " "Net weight
UNIT_OF_WTX TYPE BAPI_MARAX-UNIT_OF_WT, "Weight Unit
DIVISIONX TYPE BAPI_MARAX-DIVISION, "Division
PROD_HIERX TYPE BAPI_MARA, "Competitor
CAD_IDX TYPE BAPI_MARAX-PROD_HIER, "Procurement rule
ALLWD_VOLX TYPE BAPI_MARAX-ALLWD_VOL, "Allowed packaging
PVALIDFROMX TYPE BAPI_MARAX-PVALIDFROM, "Date from which the cross-plant material status
SVALIDFROMX TYPE BAPI_MARAX-SVALIDFROM, "Date from which the X-distr.-chain material stat
PROD_ALLOCX TYPE BAPI_MARAX-PROD_ALLOC,
HIGH_VISCX TYPE BAPI_MARAX-HIGH_VISC,"Indicator: Highly Viscous
LOOSEORLIQX TYPE BAPI_MARAX-LOOSEORLIQ, "Indicator: In Bulk/Liquid
INV_MAT_NO_EXTERNALX TYPE BAPI_MARAX-INV_MAT_NO_EXTERNAL,
EXTMATLGRPX TYPE BAPI_MARAX-EXTMATLGRP, " External Material Group
****<<<<<<<<<<<<<<PLANTDATA>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
PLANT TYPE BAPI_MARC-PLANT, " Plant
MRP_TYPE TYPE BAPI_MARC-MRP_TYPE, "MRP Type
REORDER_PT TYPE BAPI_MARC-REORDER_PT, "Reorder Point
SAFETY_STK TYPE BAPI_MARC-SAFETY_STK, "Safety stock
MINLOTSIZE TYPE BAPI_MARC-MINLOTSIZE, "Minimum lot size
****<<<<<<<<<<<<<<PLANTDATA INITIAL>>>>>>>>>>>>>>>>>>>>>>
PLANTX TYPE BAPI_MARCX-PLANT, " Plant
MRP_TYPEX TYPE BAPI_MARCX-MRP_TYPE, "MRP Type
REORDER_PTX TYPE BAPI_MARCX-REORDER_PT, "Reorder Point
SAFETY_STKX TYPE BAPI_MARCX-SAFETY_STK, "Safety stock
MINLOTSIZEX TYPE BAPI_MARCX-MINLOTSIZE, "Minimum lot size
*<<<<<<<<<<<<<<<FORECASTPARAMETERS>>>>>>>>>>
F_PLANT TYPE BAPI_MPOPX-PLANT, " Plant
*<<<<<<<<<<<<<<<FORECASTPARAMETERS DATA INTIAL>>>>>>>>>>
F_PLANTX TYPE BAPI_MPOPX-PLANT, " Plant
*<<<<<<<<<<<<<<<PLANNING DATA >>>>>>>>>>>>>>>>>>>>>>>>>
P_PLANT TYPE BAPI_MPGD-PLANT, " Plant
*<<<<<<<<<<<<<<<PLANNING DATA INITAIAL >>>>>>>>>>>>>>>
P_PLANTX TYPE BAPI_MPGDX-PLANT, " Plant
*<<<<<<<<<<<<<<<STORAGELOCATIONDATA>>>>>>>>>>>>>>>>>>>>
S_PLANT TYPE BAPI_MARD-PLANT, " Plant
S_STGE_LOC TYPE BAPI_MARD-STGE_LOC,
*<<<<<<<<<<<<<<<STORAGELOCATIONDATA INITIAL>>>>>>>>>>
S_PLANTX TYPE BAPI_MARDX-PLANT, " Plant
S_STGE_LOCX TYPE BAPI_MARDX-STGE_LOC, "Storage Location
*<<<<<<<<<<<<<<<SALESDATA DATA >>>>>>>>>>
SALES_ORG TYPE BAPI_MVKE-SALES_ORG, "Sales Organization
DISTR_CHAN TYPE BAPI_MVKE-DISTR_CHAN, "Distribution Channel
*<<<<<<<<<<<<<<<SALESDATA DATA INITIAL >>>>>>>>>>
SALES_ORGX TYPE BAPI_MVKEX-SALES_ORG, "Sales Organization
DISTR_CHANX TYPE BAPI_MVKEX-DISTR_CHAN, "Distribution Channel
*****<<<<<<<<<<<<<<<MATERIAL_DESC>>>>>>>>>>>>>>>>>>>>>>>>>>
LANGU TYPE BAPI_MAKT-LANGU , "Language Key
LANGU_ISO TYPE BAPI_MAKT-LANGU_ISO , "Language according to ISO 639
MATL_DESC TYPE BAPI_MAKT-MATL_DESC , "Material Description
*****<<<<<<<<<<<<<<<GT_UNITSOFMEASURE>>>>>>>>>>>>>>>>>>>>>>>>>>
ALT_UNIT TYPE BAPI_MARM-ALT_UNIT,
"Alternative Unit of Measure for Stockkeeping Unit
ALT_UNIT_ISO TYPE BAPI_MARM-ALT_UNIT,
"Alternative Unit of Measure for Stockkeeping Unit
******<<<<<<<<<<<<<<<GT_UNITSOFMEASUREX>>>>>>>>>>>>>>>>>>>>>>>>>>
UNIT TYPE BAPI_MARMX-ALT_UNIT,
"Alternative Unit of Measure for Stockkeeping Unit
UNIT_ISO TYPE BAPI_MARMX-ALT_UNIT_ISO,
"Alternative unit of measure to stockkeeping unit in ISO code
*****<<<<<<<<<<<<<<<SALES TEXT>>>>>>>>>>>>>>>>>>>>>>>>>>
APPLOBJECT TYPE BAPI_MLTX-APPLOBJECT, "Texts: application object
TEXT_NAME TYPE BAPI_MLTX-TEXT_NAME, "Name
TEXT_ID TYPE BAPI_MLTX-TEXT_ID, "Text ID
S_LANGU TYPE BAPI_MLTX-LANGU, "Language key
TEXT_LINE TYPE BAPI_MLTX-TEXT_LINE, "Text line
END OF GT_FT_ITAB,
TEXT(243), " Return Message
WA_HEAD LIKE THEAD, " SalesText Header Info
ITAB_TLINE LIKE STANDARD TABLE OF TLINE WITH HEADER LINE, " SalesText
ERROR_REC TYPE I, " Error Records Counter
SUCCESS_REC TYPE I, " Successful Records Counter
TOT_REC TYPE I. " Total Records Counter
selection block for EXCEL UPLOAD FILE>>>>>>>>>>>>>>>>>>>>>>>>
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
PARAMETERS FILE TYPE IBIPPARMS-PATH OBLIGATORY .
SELECTION-SCREEN END OF BLOCK B1.
*<<<<AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .>>>>>>>>>>>>
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FILE .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
IMPORTING
FILE_NAME = FILE.
**<<<<<<<<<<<<<<<<<START-OF-SELECTION.>>>>>>>>>>>>>>>>>>>>>>>>>>>
START-OF-SELECTION.
CALL FUNCTION 'WS_UPLOAD' "#EC *
EXPORTING
FILENAME = FILE
FILETYPE = 'DAT'
TABLES
DATA_TAB = GT_FT_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
NO_AUTHORITY = 10
OTHERS = 11.
IF SY-SUBRC <> 0 .
MESSAGE E000.
ENDIF.
SKIP 3.
FORMAT COLOR COL_HEADING INVERSE ON.
WRITE 40 TEXT-001.
FORMAT COLOR COL_HEADING INVERSE OFF.
SKIP 1.
FORMAT COLOR COL_NEGATIVE INVERSE ON.
WRITE :/3 TEXT-002, 13 SY-MANDT , 104 TEXT-003, 111 SY-UNAME,
/3 TEXT-004, 13 SY-DATUM , 104 TEXT-005, 111 SY-UZEIT.
FORMAT COLOR COL_NEGATIVE INVERSE OFF.
SKIP 3.
LOOP AT GT_FT_ITAB.
HEADER-MATERIAL = GT_FT_ITAB-MATERIAL . " 'M-32'.
HEADER-IND_SECTOR = GT_FT_ITAB-IND_SECTOR . " 'C'.
HEADER-MATL_TYPE = GT_FT_ITAB-MATL_TYPE . " 'FERT'.
HEADER-BASIC_VIEW = GT_FT_ITAB-BASIC_VIEW . " 'X'.
HEADER-SALES_VIEW = GT_FT_ITAB-SALES_VIEW. " 'X'.
HEADER-PURCHASE_VIEW = GT_FT_ITAB-PURCHASE_VIEW . " 'X'.
HEADER-MRP_VIEW = GT_FT_ITAB-MRP_VIEW . " 'X'.
HEADER-FORECAST_VIEW = GT_FT_ITAB-FORECAST_VIEW . " 'X'.
HEADER-WORK_SCHED_VIEW = GT_FT_ITAB-WORK_SCHED_VIEW ." 'X'.
HEADER-PRT_VIEW = GT_FT_ITAB-PRT_VIEW . " 'X'.
HEADER-STORAGE_VIEW = GT_FT_ITAB-STORAGE_VIEW . " 'X'.
HEADER-WAREHOUSE_VIEW = GT_FT_ITAB-WAREHOUSE_VIEW . " 'X'.
HEADER-QUALITY_VIEW = GT_FT_ITAB-QUALITY_VIEW . " 'X'.
HEADER-ACCOUNT_VIEW = GT_FT_ITAB-ACCOUNT_VIEW . " 'X'.
HEADER-COST_VIEW = GT_FT_ITAB-COST_VIEW . " 'X'.
*<<CLIENT DATA>>>>>>>>>>>>>>>>>>>>>>>>>>>>
GT_CLIENTDATA-MATL_GROUP = GT_FT_ITAB-MATL_GROUP . " '01'.
GT_CLIENTDATA-OLD_MAT_NO = GT_FT_ITAB-OLD_MAT_NO . " '1000'.
GT_CLIENTDATA-BASE_UOM = GT_FT_ITAB-BASE_UOM . " 'EA'.
GT_CLIENTDATA-BASE_UOM_ISO = GT_FT_ITAB-BASE_UOM_ISO ." 'EA'.
GT_CLIENTDATA-DOCUMENT = GT_FT_ITAB-DOCUMENT . "'MATERIAL'.
GT_CLIENTDATA-DOC_TYPE = GT_FT_ITAB-DOC_TYPE . " 'A'.
GT_CLIENTDATA-DOC_VERS = GT_FT_ITAB-DOC_VERS . " '5'.
GT_CLIENTDATA-DOC_FORMAT = GT_FT_ITAB-DOC_FORMAT . " '5'.
GT_CLIENTDATA-DOC_CHG_NO = GT_FT_ITAB-DOC_CHG_NO . " 'A4'.
GT_CLIENTDATA-PAGE_NO = GT_FT_ITAB-PAGE_NO . " '1'.
GT_CLIENTDATA-PROD_MEMO = GT_FT_ITAB-PROD_MEMO . " 'MEMO'.
GT_CLIENTDATA-PAGEFORMAT = GT_FT_ITAB-PAGEFORMAT . " '1'.
GT_CLIENTDATA-SIZE_DIM = GT_FT_ITAB-SIZE_DIM . " '50/50'.
GT_CLIENTDATA-BASIC_MATL = GT_FT_ITAB-BASIC_MATL . " 'BASIS MATERIAL1'.
GT_CLIENTDATA-STD_DESCR = GT_FT_ITAB-STD_DESCR . " 'MATERIAL DESC'.
GT_CLIENTDATA-DSN_OFFICE = GT_FT_ITAB-DSN_OFFICE . " '001'.
GT_CLIENTDATA-NET_WEIGHT = GT_FT_ITAB-NET_WEIGHT . " 1000.
GT_CLIENTDATA-UNIT_OF_WT = GT_FT_ITAB-UNIT_OF_WT . " 'KG'.
GT_CLIENTDATA-TRANS_GRP = '0001'.
GT_CLIENTDATA-DIVISION = GT_FT_ITAB-DIVISION . " '01'.
GT_CLIENTDATA-QTY_GR_GI = '9000'.
GT_CLIENTDATA-CAD_ID = GT_FT_ITAB-CAD_ID . " 'X'.
GT_CLIENTDATA-ALLWD_VOL = '9000'.
GT_CLIENTDATA-PROD_ALLOC = GT_FT_ITAB-PROD_ALLOC . " 'PA01'.
GT_CLIENTDATA-HAZMATPROF = GT_FT_ITAB-HAZMATPROF . " '001'.
GT_CLIENTDATA-HIGH_VISC = GT_FT_ITAB-HIGH_VISC . " 'X'.
GT_CLIENTDATA-LOOSEORLIQ = GT_FT_ITAB-LOOSEORLIQ . " 'X'.
GT_CLIENTDATA-PERIOD_IND_EXPIRATION_DATE = GT_FT_ITAB-PERIOD_IND_EXPIRATION_DATE . " 'D'.
GT_CLIENTDATA-ITEM_CAT = 'NORM' . "GT_FT_ITAB-ITEM_CAT . " 'NORM'.
GT_CLIENTDATA-EXTMATLGRP = GT_FT_ITAB-EXTMATLGRP . " '01'.
**<<<<<<<<CLIENT DATA INITIAL>>>>>>>>>>>>>
GT_CLIENTDATAX-MATL_GROUP = 'X'.
GT_CLIENTDATAX-OLD_MAT_NO = GT_FT_ITAB-OLD_MAT_NO . " 'X'.
GT_CLIENTDATAX-BASE_UOM = GT_FT_ITAB-BASE_UOM . " 'X'.
GT_CLIENTDATAX-BASE_UOM_ISO = GT_FT_ITAB-BASE_UOM_ISO . "'X'.
GT_CLIENTDATAX-DOCUMENT = GT_FT_ITAB-DOCUMENT . "'X'.
GT_CLIENTDATAX-DOC_TYPE = GT_FT_ITAB-DOC_TYPE . "'X'.
GT_CLIENTDATAX-DOC_VERS = GT_FT_ITAB-DOC_VERS . "'X'.
GT_CLIENTDATAX-DOC_FORMAT = GT_FT_ITAB-DOC_FORMAT . "'X'.
GT_CLIENTDATAX-DOC_CHG_NO = GT_FT_ITAB-DOC_CHG_NO . "'X'.
GT_CLIENTDATAX-PAGE_NO = GT_FT_ITAB-PAGE_NO . "'X'.
GT_CLIENTDATAX-PROD_MEMO = GT_FT_ITAB-PROD_MEMO . "'X'.
GT_CLIENTDATAX-PAGEFORMAT = 'X'.
GT_CLIENTDATAX-SIZE_DIM = GT_FT_ITAB-SIZE_DIM . "'X'
GT_CLIENTDATAX-BASIC_MATL = GT_FT_ITAB-BASIC_MATL. "'X'.
GT_CLIENTDATAX-STD_DESCR = GT_FT_ITAB-STD_DESCR . "'X'.
GT_CLIENTDATAX-DSN_OFFICE = GT_FT_ITAB-DSN_OFFICE . "'X'.
GT_CLIENTDATAX-NET_WEIGHT = GT_FT_ITAB-NET_WEIGHT . "'X'.
GT_CLIENTDATAX-UNIT_OF_WT = GT_FT_ITAB-UNIT_OF_WT . "'X'.
GT_CLIENTDATAX-DIVISION = GT_FT_ITAB-DIVISION . "'X'.
GT_CLIENTDATAX-PROD_HIER = GT_FT_ITAB-PROD_HIERX . "'X'.
GT_CLIENTDATAX-CAD_ID = GT_FT_ITAB-CAD_ID . "'X'.
GT_CLIENTDATAX-ALLWD_VOL = GT_FT_ITAB-ALLWD_VOLX . "'X'.
GT_CLIENTDATAX-PROD_ALLOC = GT_FT_ITAB-PROD_ALLOCX . "'X'.
GT_CLIENTDATAX-HAZMATPROF = 'X'.
GT_CLIENTDATAX-HIGH_VISC = GT_FT_ITAB-HIGH_VISCX . "'X'.
GT_CLIENTDATAX-LOOSEORLIQ = GT_FT_ITAB-LOOSEORLIQX . "'X'.
GT_CLIENTDATAX-ITEM_CAT = 'X'.
GT_CLIENTDATAX-INV_MAT_NO_EXTERNAL = GT_FT_ITAB-INV_MAT_NO_EXTERNALX . "'X'.
GT_CLIENTDATAX-EXTMATLGRP = GT_FT_ITAB-EXTMATLGRPX . " 'X'.
GT_CLIENTDATAX-TRANS_GRP = 'X'.
GT_CLIENTDATAX-QTY_GR_GI = 'X'.
GT_CLIENTDATAX-ALLWD_VOL = 'X'.
***<<<<<PLANTDATA>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
GT_PLANTDATA-PLANT = GT_FT_ITAB-PLANT . " '0001'.
GT_PLANTDATA-MRP_TYPE = GT_FT_ITAB-MRP_TYPE . "'ND'.
GT_PLANTDATA-PUR_GROUP = '001'. "Purchasing Group
GT_PLANTDATA-PROC_TYPE = 'F'. "Procurement Type
GT_PLANTDATA-SPPROCTYPE = '10'. "Special procurement type
GT_PLANTDATA-REORDER_PT = GT_FT_ITAB-REORDER_PT . "8000.
GT_PLANTDATA-SAFETY_STK = 2.
GT_PLANTDATA-LOADINGGRP = '0001'. "Loading group
GT_PLANTDATA-MINLOTSIZE = GT_FT_ITAB-MINLOTSIZE . "6000.
**<<<<<<<<PLANT DATA INITIAL>>>>>>>>>>>>>
GT_PLANTDATAX-PLANT = GT_FT_ITAB-PLANTX. " '0001'.
GT_PLANTDATAX-MRP_TYPE = GT_FT_ITAB-MRP_TYPEX. " 'X'.
GT_PLANTDATAX-PUR_GROUP = 'X'. "Purchasing Group
GT_PLANTDATAX-PROC_TYPE = 'X'. "Procurement Type
GT_PLANTDATAX-SPPROCTYPE = 'X'. "Special procurement type
GT_PLANTDATAX-LOADINGGRP = 'X'. "Loading group
GT_PLANTDATAX-REORDER_PT = GT_FT_ITAB-REORDER_PTX. " 'X'.
GT_PLANTDATAX-SAFETY_STK = GT_FT_ITAB-SAFETY_STKX. "'X'.
GT_PLANTDATAX-MINLOTSIZE = GT_FT_ITAB-MINLOTSIZEX. "'X'.
*<<<<<<<<<<<<<<<FORECASTPARAMETERS>>>>>>>>>>
GT_FORECASTPARAMETERS-PLANT = GT_FT_ITAB-F_PLANT. " '0001'.
*<<<<<<<<<<<<<<<FORECASTPARAMETERS DATA INTIAL>>>>>>>>>>
GT_FORECASTPARAMETERSX = '0001'.
GT_FORECASTPARAMETERSX-PLANT = GT_FT_ITAB-F_PLANTX. " '0001'.
*<<<<<<<<<<<<<<<PLANNING DATA >>>>>>>>>>
*GT_PLANNINGDATA-PLANT = GT_FT_ITAB-P_PLANT. " '0001'.
GT_PLANNINGDATA-PLANT = '0001'.
*<<<<<<<<<<<<<<<PLAN -
hi
i want know what is the difference between BDC and LSMW and which is best also tell me BDC and LSMW using for which type data (like master or transactional data)
thanka in advance
deepakHi deepak,
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.
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 -
How can we use TABLE CONTROL in BDC and WORK FLOW of ABAP.
how can we use TABLE CONTROL in BDC and WORK FLOW of ABAP.?
please explain the important questions.How to deal with table control / step loop in BDC
Steploop and table contol is inevitable in certain transactions. When we run BDC for such transactions, we will face the situation: how many visible lines of steploop/tablecontrol are on the screen? Although we can always find certain method to deal with it, such as function code 'NP', 'POPO', considering some extreme situation: there is only one line visible one the screen, our BDC program should display an error message. (See transaction 'ME21', we you resize your screen to let only one row visible, you can not enter mutiple lines on this screen even you use 'NP')
Now with the help of Poonam on sapfans.com developement forum, I find a method with which we can determine the number of visible lines on Transaction Screen from our Calling BDC program. Maybe it is useless to you, but I think it will give your some idea.
Demo ABAP code has two purposes:
1. how to determine number of visible lines and how to calculte page number;
(the 'calpage' routine has been modify to meet general purpose usage)
2. using field symbol in BDC program, please pay special attention to the difference in Static ASSIGN and Dynamic ASSIGN.
Now I begin to describe the step to implement my method:
(I use transaction 'ME21', screen 121 for sample,
the method using is Call Transation Using..)
Step1: go to screen painter to display the screen 121, then we can count the fixed line on this screen, there is 7 lines above the steploop and 2 lines below the steploop, so there are total 9 fixed lines on this screen. This means except these 9 lines, all the other line is for step loop. Then have a look at steploop itselp, one entry of it will occupy two lines.
(Be careful, for table control, the head and the bottom scroll bar will possess another two fixed lines, and there is a maximum number for table line)
Now we have : FixedLine = 9
LoopLine = 2(for table control, LoopLine is always equal to 1)
Step2: go to transaction itself(ME21) to see how it roll page, in ME21, the first line of new page is always occupied by the last line of last page, so it begin with index '02', but in some other case, fisrt line is empty and ready for input.
Now we have: FirstLine = 0
or FirstLine = 1 ( in our case, FirstLine is 1 because the first line of new page is fulfilled)
Step3: write a subroutine calcalculating number of pages
(here, the name of actual parameter is the same as formal parameter)
global data: FixedLine type i, " number of fixed line on a certain screen
LoopLine type i, " the number of lines occupied by one steploop item
FirstLine type i, " possbile value 0 or 1, 0 stand for the first line of new " scrolling screen is empty, otherwise is 1
Dataline type i, " number of items you will use in BDC, using DESCRIBE to get
pageno type i, " you need to scroll screen how many times.
line type i, " number of lines appears on the screen.
index(2) type N, " the screen index for certain item
begin type i, " from parameter of loop
end type i. " to parameter of loop
*in code sample, the DataTable-linindex stands for the table index number of this line
form calpage using FixedLine type i (see step 1)
LoopLine type i (see step 1)
FirstLine type i (see step 2)
DataLine type i ( this is the item number you will enter in transaction)
changing pageno type i (return the number of page, depends on run-time visible line in table control/ Step Loop)
changing line type i.(visible lines one the screen)
data: midd type i,
vline type i, "visible lines
if DataLine eq 0.
Message eXXX.
endif.
vline = ( sy-srows - FixedLine ) div LoopLine.
*for table control, you should compare vline with maximum line of
*table control, then take the small one that is min(vline, maximum)
*here only illustrate step loop
if FirstLine eq 0.
pageno = DataLine div vline.
if pageno eq 0.
pageno = pageno + 1.
endif.
elseif FirstLine eq 1.
pageno = ( DataLine - 1 ) div ( vline - 1 ) + 1.
midd = ( DataLine - 1 ) mod ( vline - 1).
if midd = 0 and DataLine gt 1.
pageno = pageno - 1.
endif.
endif.
line = vline.
endform.
Step4 write a subroutine to calculate the line index for each item.
form calindex using Line type i (visible lines on the screen)
FirstLine type i(see step 2)
LineIndex type i(item index)
changing Index type n. (index on the screen)
if FirstLine = 0.
index = LineIndex mod Line.
if index = '00'.
index = Line.
endif.
elseif FirstLine = 1.
index = LineIndex mod ( Line - 1 ).
if ( index between 1 and 0 ) and LineIndex gt 1.
index = index + Line - 1.
endif.
if Line = 2.
index = index + Line - 1.
endif.
endif.
endform.
Step5 write a subroutine to calculate the loop range.
form calrange using Line type i ( visible lines on the screen)
DataLine type i
FirstLine type i
loopindex like sy-index
changing begin type i
end type i.
If FirstLine = 0.
if loopindex = 1.
begin = 1.
if DataLine <= Line.
end = DataLine.
else.
end = Line.
endif.
elseif loopindex gt 1.
begin = Line * ( loopindex - 1 ) + 1.
end = Line * loopindex.
if end gt DataLine.
end = DataLine.
endif.
endif.
elseif FirstLine = 1.
if loopindex = 1.
begin = 1.
if DataLine <= Line.
end = DataLine.
else.
end = Line.
endif.
elseif loop index gt 1.
begin = ( Line - 1 ) * ( loopindex - 1 ) + 2.
end = ( Line - 1 ) * ( loopindex - 1 ) + Line.
if end gt DataLine.
end = DataLine.
endif.
endif.
endif.
endform.
Step6 using field sysbol in your BDC, for example: in ME21, but you should calculate each item will correponding to which index in steploop/Table Control
form creat_bdc.
field-symbols: <material>, <quan>, <indicator>.
data: name1(14) value 'EKPO-EMATN(XX)',
name2(14) value 'EKPO-MENGE(XX)',
name3(15) value 'RM06E-SELKZ(XX)'.
assign: name1 to <material>,
name2 to <quan>,
name3 to <indicator>.
do pageno times.
if sy-index gt 1
*insert scroll page ok_code"
endif.
perform calrange using Line DataLine FirstLine sy-index
changing begin end.
loop at DataTable from begin to end.
perform calindex using Line FirstLine DataTable-LineIndex changing Index.
name1+11(2) = Index.
name2+11(2) = Index.
name3+12(2) = Index.
perform bdcfield using <material> DataTable-matnr.
perform bdcfield using <quan> DataTable-menge.
perform bdcfield using <indicator> DataTable-indicator.
endloop.
enddo.
An example abap program of handling Table Control during bdc programming.
REPORT zmm_bdcp_purchaseorderkb02
NO STANDARD PAGE HEADING LINE-SIZE 255.
Declaring internal tables *
*-----Declaring line structure
DATA : BEGIN OF it_dummy OCCURS 0,
dummy(255) TYPE c,
END OF it_dummy.
*-----Internal table for line items
DATA : BEGIN OF it_idata OCCURS 0,
ematn(18), "Material Number.
menge(13), "Qyantity.
netpr(11), "Net Price.
werks(4), "Plant.
ebelp(5), "Item Number.
END OF it_idata.
*-----Deep structure for header data and line items
DATA : BEGIN OF it_me21 OCCURS 0,
lifnr(10), "Vendor A/c No.
bsart(4), "A/c Type.
bedat(8), "Date of creation of PO.
ekorg(4), "Purchasing Organisation.
ekgrp(3), "Purchasing Group.
x_data LIKE TABLE OF it_idata,
END OF it_me21.
DATA : x_idata LIKE LINE OF it_idata.
DATA : v_delimit VALUE ','.
DATA : v_indx(3) TYPE n.
DATA : v_fnam(30) TYPE c.
DATA : v_count TYPE n.
DATA : v_ne TYPE i.
DATA : v_ns TYPE i.
*include bdcrecx1.
INCLUDE zmm_incl_purchaseorderkb01.
Search help for file *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.
START-OF-SELECTION.
To upload the data into line structure *
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = it_dummy.
Processing the data from line structure to internal tables *
REFRESH:it_me21.
CLEAR :it_me21.
LOOP AT it_dummy.
IF it_dummy-dummy+0(01) = 'H'.
v_indx = v_indx + 1.
CLEAR it_idata.
REFRESH it_idata.
CLEAR it_me21-x_data.
REFRESH it_me21-x_data.
SHIFT it_dummy.
SPLIT it_dummy AT v_delimit INTO it_me21-lifnr
it_me21-bsart
it_me21-bedat
it_me21-ekorg
it_me21-ekgrp.
APPEND it_me21.
ELSEIF it_dummy-dummy+0(01) = 'L'.
SHIFT it_dummy.
SPLIT it_dummy AT v_delimit INTO it_idata-ematn
it_idata-menge
it_idata-netpr
it_idata-werks
it_idata-ebelp.
APPEND it_idata TO it_me21-x_data.
MODIFY it_me21 INDEX v_indx.
ENDIF.
ENDLOOP.
To open the group *
PERFORM open_group.
To populate the bdcdata table for header data *
LOOP AT it_me21.
v_count = v_count + 1.
REFRESH it_bdcdata.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0100',
' ' 'BDC_CURSOR' 'EKKO-LIFNR',
' ' 'BDC_OKCODE' '/00',
' ' 'EKKO-LIFNR' it_me21-lifnr,
' ' 'RM06E-BSART' it_me21-bsart,
' ' 'RM06E-BEDAT' it_me21-bedat,
' ' 'EKKO-EKORG' it_me21-ekorg,
' ' 'EKKO-EKGRP' it_me21-ekgrp,
' ' 'RM06E-LPEIN' 'T'.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'RM06E-EBELP',
' ' 'BDC_OKCODE' '/00'.
MOVE 1 TO v_indx.
*-----To populate the bdcdata table for line item data
LOOP AT it_me21-x_data INTO x_idata.
CONCATENATE 'EKPO-EMATN(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-ematn.
CONCATENATE 'EKPO-MENGE(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-menge.
CONCATENATE 'EKPO-NETPR(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-netpr.
CONCATENATE 'EKPO-WERKS(' v_indx ')' INTO v_fnam.
PERFORM subr_bdc_table USING ' ' v_fnam x_idata-werks.
v_indx = v_indx + 1.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'RM06E-EBELP',
' ' 'BDC_OKCODE' '/00'.
ENDLOOP.
PERFORM subr_bdc_table USING: 'X' 'SAPMM06E' '0120',
' ' 'BDC_CURSOR' 'RM06E-EBELP',
' ' 'BDC_OKCODE' '=BU'.
PERFORM bdc_transaction USING 'ME21'.
ENDLOOP.
PERFORM close_group.
End of selection event *
END-OF-SELECTION.
IF session NE 'X'.
*-----To display the successful records
WRITE :/10 text-001. "Sucess records
WRITE :/10 SY-ULINE(20).
SKIP.
IF it_sucess IS INITIAL.
WRITE :/ text-002.
ELSE.
WRITE :/ text-008, "Total number of Succesful records
35 v_ns.
SKIP.
WRITE:/ text-003, "Vendor Number
17 text-004, "Record number
30 text-005. "Message
ENDIF.
LOOP AT it_sucess.
WRITE:/4 it_sucess-lifnr,
17 it_sucess-tabix CENTERED,
30 it_sucess-sucess_rec.
ENDLOOP.
SKIP.
*-----To display the erroneous records
WRITE:/10 text-006. "Error Records
WRITE:/10 SY-ULINE(17).
SKIP.
IF it_error IS INITIAL.
WRITE:/ text-007. "No error records
ELSE.
WRITE:/ text-009, "Total number of erroneous records
35 v_ne.
SKIP.
WRITE:/ text-003, "Vendor Number
17 text-004, "Record number
30 text-005. "Message
ENDIF.
LOOP AT it_error.
WRITE:/4 it_error-lifnr,
17 it_error-tabix CENTERED,
30 it_error-error_rec.
ENDLOOP.
REFRESH it_sucess.
REFRESH it_error.
ENDIF.
CODE IN INCLUDE.
Include ZMM_INCL_PURCHASEORDERKB01
DATA: it_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
DATA: it_MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA: E_GROUP_OPENED.
*-----Internal table to store sucess records
DATA:BEGIN OF it_sucess OCCURS 0,
msgtyp(1) TYPE c,
lifnr LIKE ekko-lifnr,
tabix LIKE sy-tabix,
sucess_rec(125),
END OF it_sucess.
DATA: g_mess(125) type c.
*-----Internal table to store error records
DATA:BEGIN OF it_error OCCURS 0,
msgtyp(1) TYPE c,
lifnr LIKE ekko-lifnr,
tabix LIKE sy-tabix,
error_rec(125),
END OF it_error.
Selection screen
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS session RADIOBUTTON GROUP ctu. "create session
SELECTION-SCREEN COMMENT 3(20) text-s07 FOR FIELD session.
SELECTION-SCREEN POSITION 45.
PARAMETERS ctu RADIOBUTTON GROUP ctu. "call transaction
SELECTION-SCREEN COMMENT 48(20) text-s08 FOR FIELD ctu.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(20) text-s01 FOR FIELD group.
SELECTION-SCREEN POSITION 25.
PARAMETERS group(12). "group name of session
SELECTION-SCREEN COMMENT 48(20) text-s05 FOR FIELD ctumode.
SELECTION-SCREEN POSITION 70.
PARAMETERS ctumode LIKE ctu_params-dismode DEFAULT 'N'.
"A: show all dynpros
"E: show dynpro on error only
"N: do not display dynpro
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 48(20) text-s06 FOR FIELD cupdate.
SELECTION-SCREEN POSITION 70.
PARAMETERS cupdate LIKE ctu_params-updmode DEFAULT 'L'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 3(20) text-s03 FOR FIELD keep.
SELECTION-SCREEN POSITION 25.
PARAMETERS: keep AS CHECKBOX. "' ' = delete session if finished
"'X' = keep session if finished
SELECTION-SCREEN COMMENT 48(20) text-s09 FOR FIELD e_group.
SELECTION-SCREEN POSITION 70.
PARAMETERS e_group(12). "group name of error-session
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 51(17) text-s03 FOR FIELD e_keep.
SELECTION-SCREEN POSITION 70.
PARAMETERS: e_keep AS CHECKBOX. "' ' = delete session if finished
"'X' = keep session if finished
SELECTION-SCREEN END OF LINE.
PARAMETERS:p_file LIKE rlgrap-filename.
at selection screen *
AT SELECTION-SCREEN.
group and user must be filled for create session
IF SESSION = 'X' AND
GROUP = SPACE. "OR USER = SPACE.
MESSAGE E613(MS).
ENDIF.
create batchinput session *
FORM OPEN_GROUP.
IF SESSION = 'X'.
SKIP.
WRITE: /(20) 'Create group'(I01), GROUP.
SKIP.
*----open batchinput group
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = GROUP
USER = sy-uname.
WRITE:/(30) 'BDC_OPEN_GROUP'(I02),
(12) 'returncode:'(I05),
SY-SUBRC.
ENDIF.
ENDFORM. "OPEN_GROUP
end batchinput session *
FORM CLOSE_GROUP.
IF SESSION = 'X'.
*------close batchinput group
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /(30) 'BDC_CLOSE_GROUP'(I04),
(12) 'returncode:'(I05),
SY-SUBRC.
ELSE.
IF E_GROUP_OPENED = 'X'.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /.
WRITE: /(30) 'Fehlermappe wurde erzeugt'(I06).
ENDIF.
ENDIF.
ENDFORM. "CLOSE_GROUP
Start new transaction according to parameters *
FORM BDC_TRANSACTION USING TCODE TYPE ANY.
DATA: L_SUBRC LIKE SY-SUBRC.
*------batch input session
IF SESSION = 'X'.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = TCODE
TABLES
DYNPROTAB = it_BDCDATA.
WRITE: / 'BDC_INSERT'(I03),
TCODE,
'returncode:'(I05),
SY-SUBRC,
'RECORD:',
SY-INDEX.
ELSE.
REFRESH it_MESSTAB.
CALL TRANSACTION TCODE USING it_BDCDATA
MODE CTUMODE
UPDATE CUPDATE
MESSAGES INTO it_MESSTAB.
L_SUBRC = SY-SUBRC.
WRITE: / 'CALL_TRANSACTION',
TCODE,
'returncode:'(I05),
L_SUBRC,
'RECORD:',
SY-INDEX.
ENDIF.
Message handling for Call Transaction *
perform subr_mess_hand using g_mess.
*-----Erzeugen fehlermappe
IF L_SUBRC <> 0 AND E_GROUP <> SPACE.
IF E_GROUP_OPENED = ' '.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = E_GROUP
USER = sy-uname
KEEP = E_KEEP.
E_GROUP_OPENED = 'X'.
ENDIF.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = TCODE
TABLES
DYNPROTAB = it_BDCDATA.
ENDIF.
REFRESH it_BDCDATA.
ENDFORM. "BDC_TRANSACTION
Form subr_bdc_table *
text
-->P_0220 text *
-->P_0221 text *
-->P_0222 text *
FORM subr_bdc_table USING VALUE(P_0220) TYPE ANY
VALUE(P_0221) TYPE ANY
VALUE(P_0222) TYPE ANY.
CLEAR it_bdcdata.
IF P_0220 = ' '.
CLEAR it_bdcdata.
it_bdcdata-fnam = P_0221.
it_bdcdata-fval = P_0222.
APPEND it_bdcdata.
ELSE.
it_bdcdata-dynbegin = P_0220.
it_bdcdata-program = P_0221.
it_bdcdata-dynpro = P_0222.
APPEND it_bdcdata.
ENDIF.
ENDFORM. " subr_bdc_table
Form subr_mess_hand *
text *
-->P_G_MESS text *
FORM subr_mess_hand USING P_G_MESS TYPE ANY.
LOOP AT IT_MESSTAB.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = it_messtab-msgid
LANG = it_messtab-msgspra
NO = it_messtab-msgnr
v1 = it_messtab-msgv1
v2 = it_messtab-msgv2
IMPORTING
MSG = P_G_MESS
EXCEPTIONS
OTHERS = 0.
CASE it_messtab-msgtyp.
when 'E'.
it_error-error_rec = P_G_MESS.
it_error-lifnr = it_me21-lifnr.
it_error-tabix = v_count.
APPEND IT_ERROR.
when 'S'.
it_sucess-sucess_rec = P_G_MESS.
it_sucess-lifnr = it_me21-lifnr.
it_sucess-tabix = v_count.
APPEND IT_SUCESS.
endcase.
ENDLOOP.
Describe table it_sucess lines v_ns.
Describe table it_error lines v_ne.
ENDFORM. " subr_mess_hand
Also refer
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bdc-table-control-668404
and
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
Regards,
srinivas
<b>*reward for useful answers*</b> -
In which table scripts and smartforms are stored
in which tables scripts and smartforms are stored
eg scripts in tadir.Hi this may be of some help.
SD
SALES ORDER/ENQUIRY/QUOTATION
Output type : BA00
ScriptForm Name : RVORDER01
Driver Program Name : RVADOR01
smartform name
DELIVERY NOTE
Output type : LD00
ScriptForm Name : RVDELNOTE
Driver Program Name : RVADDN01
smartform name : LE_SHP_DELNOTE
Smartform Driver Pgm: RLE_DELNOTE
INVOICE
Output type : RD00
ScriptForm Name : RVINVOICE01
Driver Program Name : RVADIN01
smartform name : LB_BIL_INVOICE
Smartform Driver Pgm: RLB_INVOICE
MM
PUCHASE ORDER/RFQ/CONTRACT
Output type : NEU
ScriptForm Name : MEDRUCK
Driver Program Name : SAPMF06P
smartform name : /SMB40/MMPO_L
smartform driver program: /SMB40/FM06P
GOODS RECEIPT
Output type : WE01
ScriptForm Name : WESCHEINVERS1
smartform name : /SMB40/MMGR1_A
smartform driver program: /SMB40/M07DR
GOODS ISSUE
Output type : WA01
ScriptForm Name : WA_SCHEINVERS1
smartform name : /SMB40/MMGI1_A
smartform driver program: /SMB40/M07DR
FI Forms
Account Statement : F140_ACC_STAT_01
Cheque Printing : F110_PRENUM_CHEK
Balance Confirmation: F130_confirm_01
Dunning Form: F150_DUNN_01
check the link below it provides steps to convert sap scripts to smartforms
http://www.ficoexpertonline.com/downloads/Iyer_SmartForms.pdf
SMARTFORMS -Driver Program
PO: /SMB40/FM06P
SO: /SMB40/RVADOR01
GR: /SMB40/M07DR
with regards,
Hema Sundara.
pls give points if u find this helpful. -
String search in SAP Script and Smartforms
Hi All,
We have an urgent requirement where we need to search for a character string in all SAP Scripts and Smartforms in our system.
It would also help if we can get the names of programs/function modules which are internally generated for the same.
Any pointers on the same would be helpful.
Regards,
SaurabhYou can create a variable window in the main window.
You can restrict the last item of the main window by varying the size of main window. In your wite-form ,
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM'
function = 'SET'
type = 'BODY'
window = 'MAIN'
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
OTHERS = 10.
IF sy-subrc <> 0.
DO this. in the bottom of the main window, create a variable window.
you can add your text in the variable window inside main window.
it will be displayed just after the item ends.
Reagrds,
Pritha.
Message was edited by:
Pritha Agrawal -
'Create' Push button is not working in BDC and LSMW while uploading G/L master data
Hello Experts:
I am facing the following problem:
While uploading G/L master data with the BDC program, 'create' push button is not working even after executing following lines.
PERFORM BDC_DYNPRO USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ACC_CRE'.
Create G/L account screen is not coming in BDC. Please suggest me what to do.
Thanks !!Re: 'Create' Push button is not working in BDC and LSMW while uploading G/L master data
Re: 'Create' Push button is not working in BDC and LSMW while uploading G/L master data
Hi Glen Anthony
Thank you for the reply Glen Anthony please take a look at the following code.
REPORT ZFI_BDC_FS00
NO STANDARD PAGE HEADING LINE-SIZE 255.
*INCLUDE BDCRECX1.
TYPES : BEGIN OF STR,
BUKRS TYPE GLACCOUNT_SCREEN_KEY-BUKRS, "Company Code
SAKNR TYPE GLACCOUNT_SCREEN_KEY-SAKNR, "G/L Account Number
KTOKS TYPE GLACCOUNT_SCREEN_COA-KTOKS, "G/L Account Group
XPLACCT TYPE GLACCOUNT_SCREEN_COA-XPLACCT, "P&L statement account
XBILK TYPE GLACCOUNT_SCREEN_COA-XBILK, "Indicator: Account is a balance sheet account?
TXT20_ML TYPE GLACCOUNT_SCREEN_COA-TXT20_ML, "G/L account short text
TXT50_ML TYPE GLACCOUNT_SCREEN_COA-TXT50_ML, "G/L account short text
WAERS TYPE GLACCOUNT_SCREEN_CCODE-WAERS, "Account currency
XSALH TYPE GLACCOUNT_SCREEN_CCODE-XSALH, "Indicator: Only Manage Balances in Local Currency
MWSKZ TYPE GLACCOUNT_SCREEN_CCODE-MWSKZ, "Tax Category in Account Master Record
XMWNO TYPE GLACCOUNT_SCREEN_CCODE-XMWNO, "Indicator: Tax code is not a required field
MITKZ TYPE GLACCOUNT_SCREEN_CCODE-MITKZ, "Account is reconciliation account
XOPVW TYPE GLACCOUNT_SCREEN_CCODE-XOPVW, "Indicator: Open item management?
XKRES TYPE GLACCOUNT_SCREEN_CCODE-XKRES, "Indicator: Can Line Items Be Displayed by Account?
ZUAWA TYPE GLACCOUNT_SCREEN_CCODE-ZUAWA, "Key for sorting according to assignment numbers
FSTAG TYPE GLACCOUNT_SCREEN_CCODE-FSTAG, "Field status group
XINTB TYPE GLACCOUNT_SCREEN_CCODE-XINTB, "Indicator: Is account only posted to automatically?
END OF STR.
DATA : ITAB TYPE TABLE OF STR WITH HEADER LINE,
IT_BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE,
TXT(4096) TYPE C OCCURS 0,
MSG TYPE STRING,
COUNT(5) TYPE N.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : MY_FILE TYPE RLGRAP-FILENAME.
SELECTION-SCREEN : END OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR MY_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
* FIELD_NAME = ' '
IMPORTING
FILE_NAME = MY_FILE
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR =
* I_LINE_HEADER =
I_TAB_RAW_DATA = TXT
I_FILENAME = MY_FILE
TABLES
I_TAB_CONVERTED_DATA = ITAB[]
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 2
IF SY-SUBRC <> 0.
* IMPLEMENT SUITABLE ERROR HANDLING HERE
ENDIF.
START-OF-SELECTION.
COUNT = 0.
LOOP AT ITAB.
*PERFORM OPEN_GROUP.
REFRESH IT_BDCDATA.
PERFORM BDC_DYNPRO USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_KEY-BUKRS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ACC_CRE'.
*PERFORM BDC_FIELD USING 'BDC_CURSOR'
* 'GLACCOUNT_SCREEN_KEY-BUKRS'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_KEY-SAKNR'
ITAB-SAKNR. "'5'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_KEY-BUKRS'
ITAB-BUKRS. "'TATA'.
PERFORM BDC_DYNPRO USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=2102_GROUP'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-KTOKS'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_COA-KTOKS'
ITAB-KTOKS. "'GL'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
ITAB-XPLACCT. "'X'.
PERFORM BDC_DYNPRO USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=2102_BS_PL'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-XBILK'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_COA-KTOKS'
ITAB-KTOKS. "'GL'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
ITAB-XPLACCT. "''.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_COA-XBILK'
ITAB-XBILK. "'X'.
PERFORM BDC_DYNPRO USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=TAB02'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_COA-KTOKS'
ITAB-KTOKS. "'GL'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_COA-XBILK'
ITAB-XBILK. "'X'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_COA-TXT50_ML'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
ITAB-TXT20_ML. "'G/L ACCOUNT'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
ITAB-TXT50_ML. "'G/L ACCOUNT'.
PERFORM BDC_DYNPRO USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=TAB03'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_CCODE-WAERS'
ITAB-WAERS. "'INR'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_CCODE-XSALH'
ITAB-XSALH. "'X'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
ITAB-MWSKZ. "'*'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_CCODE-XMWNO'
ITAB-XMWNO. "'X'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_CCODE-MITKZ'
ITAB-MITKZ. "''.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-ZUAWA'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_CCODE-XOPVW'
ITAB-XOPVW. "'X'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_CCODE-XKRES'
ITAB-XKRES. "'X'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
ITAB-ZUAWA. "'1'.
PERFORM BDC_DYNPRO USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=SAVE'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'GLACCOUNT_SCREEN_CCODE-XINTB'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_CCODE-FSTAG'
ITAB-FSTAG. "'G019'.
PERFORM BDC_FIELD USING 'GLACCOUNT_SCREEN_CCODE-XINTB'
ITAB-XINTB. "'X'.
*PERFORM BDC_TRANSACTION USING 'FS00'.
CALL TRANSACTION 'FS00' USING IT_BDCDATA MODE 'E' UPDATE 'S'.
COUNT = COUNT + 1.
*PERFORM CLOSE_GROUP.
ENDLOOP.
CONCATENATE COUNT ' RECORDS UPDATED SUCCESSFULLY' INTO MSG.
MESSAGE MSG TYPE 'I'.
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROGRAM.
IT_BDCDATA-DYNPRO = DYNPRO.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
ENDFORM.
* INSERT FIELD *
FORM BDC_FIELD USING FNAM FVAL.
* IF FVAL <> NODATA.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA.
* ENDIF.
ENDFORM. -
Differences between BDC and LSMW
Hello SAP Gurus,
Kindly let me know the various differences between BDC and LSMW.
Also, please tell me the STEPS of the CUT-OVER PLANNING (Shifting of Data from the Legacy System to the SAP System). Here, the "Data" means which data? Please explain in details.
Looking for your early feedback.
Regards,
Kaushik.Hi,
BDC- It is Batch data communication. Its used for data conversion from legacy system to SAP system. Only technical people can do it. Tcode is SHDB.
LSMW- It is legacy system migration workbench. Its also used for data conversion from legacy system to SAP system. But it is role of functional consultant.
There are 14 steps in LSMW. As soon as you complete the one step, automatically it will go to next step.
In general you can use LSMW. But if you want to transfer more than 40,000 data, then it is not possible in LSMW. That time you can take help of BDC.
Cutover strategy depends upon how the organizations design their data load strategies. Normally, you decide the sequence of Data loads for Configuration settings, Master data, Transaction data which follows whom and then you make a copy of the system as a Production system a day before and after checking the successful data loads, you go-live 100% or partial again depending upon organizational setup and policies.
Cutover planning is highly site specific. There's no thumb rule. The stock data as on the date of going live should be correctly entered. But stock being a highly dynamic quantity, the strategy for loading should be crystal clear. Then you have to load all the back dated transaction on the stock. Some stock comes into your plant/storage location as return and some stock is actually delivered to your customer through sales orders of various kinds.
Please refer this link,
[PP Cut over activity|http://www.sap-img.com/production/pp-questions-answers.htm]
Regards,
R.Brahmankar -
Is BDC and ALE taking a back seat after the introduction of Netweaver
Hello guys
I have heard lot of people saying that after Netweaver XI's introduction to the market, BDC and ALE are taking back seat in the market. Is this true?
Are there any links where I can read some good articles on this comparison in terms of both sales pitch as well as from a technical point of view.
Thanks
RamHi,
I dont think so, Though ALE will be used between SAP to Non SAP, in most of the real time scenarios we can see ALE have been using in between SAP to SAP only. In this case we no need to use XI instead of ALE.
Coming to the BDC, since there are lot of middle ware already existed in the market, i dont think customer can switch to XI immediately. may be it will take some time. In some cases we need to use only BDC.
Thanks
Jaya -
Can any one explain me the relation between BDC and reports events?
hi experts.....
can any one explain me the relation between BDC and reports events? we are using report events in BDC programmes why?\
Is reports events occurs in each and every concept in ABAP i.e creating custom idocs, smart forms, sap scripts, dialog programmes, module pool technics?
thanks in advanceThe forums are expert forums. So the first thing I would do is change your name.
It's like entering a grand prix in a car with a "Student Driver" sign.
Rob -
Unicode enabling for ABAP scripts and smartforms
Hi All,
Could any one please advice us how we can identify whether the script or smartform is unicode updated or not and how we can convert the non unicode scripts and smartforms to unicode scripts and smartforms.
Thanks,
Srikanth.Dear srikanth...This is an scripting forum...not a sap script forum...Please post your question on the abap forum. Thanx -:)
Greetings,
Blag. -
How to call ALV Report and SMARTFORMS through Pushbutton
hi,
i have created a report.My task is to create two buttons:
1)ALV Report.
2)SMARTFROMS.
Through these button i have to call ALV Report and SMARTFORMS. i have created both button and when i execute the program,
it shows me the button but not working when i click on it.
this is the coding i have used in my report for calling ALV Report.
''Tables sscrfields,
DATA flag(1) Type c.
selection-screen: begin of screen 500 AS WINDOW TITLE tit,
BEGIN OF LINE,
PUSHBUTTON 2(18) but1 USER-COMMAND cli1,
end of line,
BEGIN OF LINE,
PUSHBUTTON 2(18) but2 USER-COMMAND cli2,
end of line,
end of screen 500.
SET PF-STATUS 'STATUS_0100'.
at selection-screen.
case sscrfields.
WHEN 'cli1'.
flag = '1'.
WHEN 'cli2'.
flag = '2'.
endcase.
at USER-COMMAND.
CASE SY-UCOMM.
WHEN 'Detail'.
select vbakkunnr VBakernam VBAkaudat vbakaufnr vbapKWMENG vbapmatnr vbap~ARKTX
into but1
from vbak inner join vbap
on vbakvbeln = vbapvbeln.
ENDSELECT.
ENDCASE.
START-OF-SELECTION.
tit = 'Format'.
but1 = 'ALV Report'.
but2 = 'SMARTFORMS'.
CALL SELECTION-SCREEN 500.
and i also use in my report
''case sscrfields-ucomm'' and ''submit my_report'' but the still button doesn't show the result.
Thanks & Regards,Hi,
I understood your requirement. What i found is, you are creating screen 500 and call it after START-OF-SELECTION,
at that time your AT USER-COMMAND doesn't work.
So what i would suggest , u should create GUI STATUS named ' PFSTAT'
having one functional key 'EXIT' that is standard u can just name it
and
other two u can assign in Freely assigned Function keys as 'BUT1' & 'BUT2'. and than in Application Toolbar u jst have it in ITEM LIST by typing BUT1 and BUT2.
For 'BUT1' text would be 'ALV' and 'BUT2' text would be 'SMARTFORMS'.
Now in Program you can code,,,
START-OF-SELECTION.
SET PF-STATUS 'PFSTAT'.
WRITE:/ 'TEST'.
at user-command.
case SY-UCOMM.
WHEN 'BUT1'.
WHEN 'BUT2'.
WHEN 'EXIT'.
LEAVE PROGRAM.
endcase.
In Program u set PF STATUS and use at user-command event, whcih gets triggered when u click on button . When u execute program you get two button in application tooldbar.
Please do needful.
Thanks,
Saurin SHah -
ABAP interfaces build using BDC and BAPIs can be used/replaced with the XI?
Hi,
We have develeloped our interfases using BDC and BAPIs. Now our client has decited to implement XI. Now could you please help in finding whether these interfaces can be used/replaced with the XI.
If yes, please let us know how?
Thanks and Regards,
ShwetaSingh,
Check this threads where they have discussed on how to use them with XI:
import BAPI into XI
Re: interface of xi with bapi
Re: BDC
Regards,
---Satish -
Hi,
Had some questions, would appreciate if somebody could help answer.
1) If I want to do a BDC on TCode T1 and if BDC is successful on T1 then do a BDC on Tcode T2 (all in the same program), Can we do a BDC using session method on multiple transactions in one session?
2) Can you call a screen from a function pool?
Thanks in advance.
MickHi Venkat,
I do not have a real life scenario, but this question came to mind when I was trying something.
But hypothetically consider a scenario where I create Purchase Orders using BDC and then if the BDC is successful then immediately do another BDC for Goods Receipt. This could also be part of some cleanup exercise where I want to do BDC's on 2 TCodes, the 2nd one only if the 1st one is successful.
Regards,
Mick -
FI transaction code used in script and smartforms
hiii dudes,
i want the FI transaction codes which is used in the script and smartforms.......Hi Sonia,
I re-loged, but in vain.
Regards,
rajesh
Maybe you are looking for
-
Error while doing investment order settlement
Dear all, My client has not settled certain line items in the previous year for some Investment orders. Now when he is carrying out settlement (KO88), for the current period, he is getting error message " AW 624"(first settle items from the previous
-
Setting Dotmac as the Screen Saver
I been trying to set my screen saver to use dotmac as the screen saver, but I cannot get it to work. I get the following message when I test the screen saver. "Your selected subscriptions have no pictures. You can change your subscriptions by clinkin
-
Duplications during itunes music folder transfer
I followed the steps detailed on this Web site for the transfer of the iTunes music folder from my laptop to an external hard drive. I then moved all my music files from another location into the folder, then did the "add folder to library" command.
-
Oracle BAM Deployment Plan XML
Hi All, The BAM adapter is not properly deployed on the WebLogic Server. It is showing status as prepared. I checked the BAM Adapter properties and found that the Plan.xml it was referencing is not present in the speified location. My question are 1)
-
Hi I wonder if anyone can help I started using CS3 and was impressed with the bridge function of opening tiff files as raw, I recently updated with CS3 extended and this option seems to have disapeared not greyed out disappeared help !!!