What is the bdc program for vendor master?
what is the bdc program for vendor master?
Hi,
Find the code here.
And do create your text file data in the order of itab structure.
{report ZBDC_XK01
no standard page heading line-size 255.
data: bdcdata like bdcdata occurs 0 with header line.
data: begin of itab occurs 0,
lifnr like lfa1-lifnr,
bukrs like RF02K-bukrs,
ekorg like RF02K-ekorg,
ktokk like RF02K-ktokk,
anred like lfa1-anred,
name1 like lfa1-name1,
sortl like lfa1-sortl,
land1 like lfa1-land1,
spras like lfa1-spras,
waers like lfm1-waers,
end of itab.
selection-screen begin of block blk1 with frame.
parameters: p_file like rlgrap-filename OBLIGATORY.
selection-screen end of block blk1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
perform f4_help_p_file.
start-of-selection.
perform get_data.
perform upload.
END-OF-SELECTION.
*& Form f4_help_p_file
text
--> p1 text
<-- p2 text
form f4_help_p_file .
data: v_file like p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = v_file.
CHECK sy-subrc EQ 0.
p_file = v_file.
endform. " f4_help_p_file
*& Form get_data
text
--> p1 text
<-- p2 text
form get_data .
data: s_file type string.
s_file = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = s_file
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = 'D'
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
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
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
stop.
ENDIF.
endform. " get_data
*& Form upload
text
--> p1 text
<-- p2 text
form upload .
loop at itab.
perform bdc_dynpro using 'SAPMF02K' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR' itab-lifnr.
perform bdc_field using 'RF02K-BUKRS' '0001'.
perform bdc_field using 'RF02K-EKORG' '1000'.
perform bdc_field using 'RF02K-KTOKK' '0001'.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-SPRAS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-ANRED' itab-anred.
perform bdc_field using 'LFA1-NAME1' itab-name1.
perform bdc_field using 'LFA1-SORTL' itab-sortl.
perform bdc_field using 'LFA1-LAND1' itab-land1.
perform bdc_field using 'LFA1-SPRAS' itab-spras.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-AKONT'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0215'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0220'.
perform bdc_field using 'BDC_CURSOR'
'LFB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0310'.
perform bdc_field using 'BDC_CURSOR'
'LFM1-WAERS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFM1-WAERS' itab-waers.
perform bdc_dynpro using 'SAPMF02K' '0320'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
call transaction 'XK01' using bdcdata mode 'A'.
refresh bdcdata.
clear itab.
endloop.
endform. " upload
*& Form bdc_dynpro
text
-->P_0126 text
-->P_0127 text
form bdc_dynpro using program dynpro.
clear bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
append bdcdata.
endform. " bdc_dynpro
*& Form bdc_field
text
-->P_0316 text
-->P_0317 text
form bdc_field using fnam fval.
clear bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
append bdcdata.
endform. " bdc_field}
Reward points if you find it helpful
Thanks,
Prasanna
Similar Messages
-
Hi what is the transaction code for vendor master delete
hi
what is the transaction code for vendor master delete? and customer master delete?
thank u
suryaHi
There won't be any Deleting of customer and vendor completely
we only BLOCK them
FK05 Block Vendor (Accounting)
MK05 Block Vendor (Purchasing)
XK05 Block Vendor (centrally)
FD05 Block Customer (Accounting)
VD05 Customer Block (Sales)
XD05 Block customer (centrally)
<b>Reward points for useful Answers</b>
Regards
Anji -
What is the standard program for Material Master upload using LSMW
Dear All
I am trying to use the MM upload using DATMIG_INF4. I want to know what are the different standard projects that are used for Material master upload.Hi Amol,
You can load the material master using direct input method in LSMW ,details of which are as follows:
Object 0020 Material master
Method 0000
Program name RMDATIND
Program type D Direct input
Please revert back in case of any doubt.
Cheers
VJ -
IDOC Posting Program for Vendor Master
Hi Guys,
Please give me the Sample Posting Program Vendor master Idoc.
Thanks a lot in advance.
Prabhu.rsearch with BD* in SE93
BD14 - Outbound program for vendor master
BD10 - Outbound Material master
BD12 - Outbound customer master -
What is the best program for designing event flyers? I am looking for something basic and simple.
Poor old Photoshop® is forever being put down when it comes to layout work, but it is perfectly capable, and can output a high quality print PDF the printer will be perfectly happy with. OK you don't have the text flow between columns bells and whistles of InDesign and [spit] Publisher, but if you have a $10/month Photoshop/Lightroom subscription, instead of the $50/month full subscription, don't think you can't do a perfectly good flyer or poster.
https://helpx.adobe.com/photoshop/how-to/align-objects-guides.html -
What is the best program for playing games,dics,3d settings such as "groove setting"
what is the best program for playing games,dics,3d settings such as "groove setting"?
Aubry,
why don't you send your sequences straight to Compressor first, encode your movies as MPEG 2 and AC3 audio and import all assets in DVD studio PRO?
G. -
What's the best program for making a header containing rollover navigation links?
I have all CS4 programs and I'm looking to make a header that contains an interactive rollover nav bar. I want the bar to be located within the header. What is the best program for creating the header and rollover buttons. I'm aware i could manipulate the images in other programs, but placement and rollover button creation is what I'm looking for. Thanks. I'm thinking maybe flash or fireworks?
Spry can do this for you. See some samples here:
http://labs.adobe.com/technologies/spry/samples/menubar/MenuBarSample.html
Or there are commercially available menu systems from the likes of companies like Project Seven, whom I would personally recommend:
http://www.projectseven.com/ -
what's the best program for print? especially for newsletter,
flyers, and catalogs? is FH going to be deprecated? thanks,
bryan> what's the best program for print? especially for
newsletter, flyers, and catalogs? is FH going to be deprecated?
thanks, bryan
If you have used FreeHand before it is sill FreeHand of
course - as long as it works in our OS and there are no new
features you like to use.
If you have documents with a lot of text elements and
multiple pages InDesign may be the second best choice. For
typography it is the best tool available.
Illustrator is more for illustrations, although it seems that
it has good control for type it is clumsy and there are a few major
bugs that makes it unsuitable for body text.
Jukka -
What's the standard program for smartform : HR_ECM_CRS
Hi Friends
what's the standard program for smartform : HR_ECM_CRS?
<REMOVED BY MODERATOR>
Regards,
Sree
Edited by: Alvaro Tejada Galindo on Feb 21, 2008 4:14 PMhi
good
check this link, hope this would help you to solve your problem.
http://saphelpbykevin.blogspot.com/2006/09/compensation-review-statement-confusion.html
thanks
mrutyun^ -
What is the best program for panning across an illustration for an App i am working on?
What is the best program for panning across an illustration for an App i am working on?
What is the best program for panning across an illustration for an App i am working on?
-
Upload program for Vendor master Partner Data in XK02 needed info
Hello Experts,
I need to write data uplaod program for XK02 for vendor master Partner functions. ( Basically we created some custom partner functions and attach it to many existing vendors ).
So kindly advice me which is the suitable upload method for this.
1) There is no BAPI available for editing vendors.
2) BDC is not possible because the Vendor partner screen is having table control and some records are already filled. (No of row not fixed).
Is there any IDOC available or any standard input pgm?
Please give suggestion.
Thanks and rgds,
AnandFor the IDOC perspective, you can uses CREMAS.
For the mass maintenance you still have XK99 (which also uses CREMAS internally)
True there is NO BAPI
For the BDC and the table control. Well this is not really true.
In batchinput, instead of maintaining the rows by there Number, you should select it at the first position.
OK-CODE /06 will open a selection screen SAPMF02K 2324. The result of the selection screen goes to the first line of the table control.
Of course this works only in BDC
reward points if helpful
Edited by: Alain Bacchi on Jun 18, 2008 8:48 AM -
Need upload program for Vendor master partners (XK02)
Hello Experts,
I need to write data uplaod program for XK02 for vendor master Partner functions. ( Basically we created some custom partner functions and attach it to many existing vendors ).
So kindly advice me which is the suitable upload method for this.
1) There is no BAPI available for editing vendors.
2) BDC is not possible because the Vendor partner screen is having table control and some records are already filled. (No of row not fixed).
Is there any IDOC available or any standard input pgm?
Please give suggestion.
Thanks and rgds,
AnandHi,
You can use LSMW --> Vendor Master which supports bothe XK01 and XK02.
This is a standard Batch input program (RFBIKR00). Look at this program documentation for more info.
Regards
Sudhir Atluru -
What is a "Load Program" for material master?
Hi All,
What is a "Load Program" for the Material master? Is this the Mass Maintainence MM17? Can a Material be extended to all VIEWs + all Plants in one shot via MM17?
What are the steps using MM17?
Thanks in advanceYes, There is a Program to Upload Material Master Ie : RMDATIND, RMDATGEN
Using the above Program you can Upload Material Master. And You can Also use Uploading Tools like LSMW / BDC etc.
MM17 is For MAss Maintenance. Suppose If you want to Update Purchase Group / Purchase Value Key / MRP Controller / Etc... to 1000 Materials Using this MM17 you can Update in Bulk.
For Extending Views You can Use MM50 with LSMW if Material is Bulk.
Regards,
Ashok -
Upload program for vendor master
Hi Friends,
Could you please help me in this.
actually i have a program like this:
i have to download the data from an excel sheet and reformat it and output into a text file so that the data can be uploaded into vendor master using standard progarm
<b>"RFBIKR00".</b>
i have written the program like this:
but in the middle when formatting the data...i'm facing the problem....
plz help me in solving that...
thnx very very much...........
the program i wrote is like this:
<b>
tables: lfa1,
lfb1,
lfm1,
lfbk,
bnka,
bgr00,
blf00,
blfa1,
blfb1,
blfbk,
blfm1,
blfb5,
blfbw,
blfei,
blfza,
blflr,
blfm2,
bwyt3,
bwyt1,
blfat.
*--- Internal table for spread sheet.
data: t_filedata like alsmex_tabline occurs 0 with header line.
*--- Internal table for Vendor Master Data in Spread Sheet.
data: begin of t_sheet occurs 0,
name1 like lfa1-name1, "vendor name1
name2 like lfa1-name2, "vendor name2
altkn like lfb1-altkn, "previous master record number
bukrs like lfb1-bukrs, "company code
ekorg like lfm1-ekorg, "purchase organization
ktokk like lfa1-ktokk, "account group
stras like lfa1-stras, "street
street4 like lfa1-name4, "street4
pfach like lfa1-pfach, "po box
ort01 like lfa1-ort01, "city
regio like lfa1-regio, "region
pstlz like lfa1-pstlz, "postal code
land1 like lfa1-land1, "country
telf1 like lfa1-telf1, "first telephone number
telfx like lfa1-telfx, "first fax number
stcd1 like lfa1-stcd1, "fed tax ID#
brsch like lfa1-brsch, "commodity code
akont like lfb1-akont, "reconciliation account
mindk like lfb1-mindk, "monitory indicator
zwels like lfb1-zwels, "payment method
reprf like lfb1-reprf, "check double invoice
banka like bnka-banka, "bank name
stret like bnka-stras, "house number and street
city like bnka-ort01, "city
provz like bnka-provz, "bank state
banks like lfbk-banks, "bank country
swift like bnka-swift, "swift code
bankl like lfbk-bankl, "aba#
bankn like lfbk-bankn, "bank account no
zterm like lfb1-zterm, "payment terms
terms like lfm1-zterm, "terms of payment key
end of t_sheet.
*--- Internal table for Vendor Master data in Text File.
data: begin of t_file occurs 0,
s_session type bgr00,
s_header type blf00,
s_blfa1 type blfa1,
s_blfb1 type blfb1,
s_blfbk type blfbk,
s_blfm1 type blfm1,
s_blfbk type blfbk,
s_blfb5 type blfb5,
s_blfza type blfza,
s_blfm1 type blfm1,
s_blfat type blfat,
s_bwyt1 type bwyt1,
s_bwyt3 type bwyt3,
s_blfm2 type blfm2,
s_blfei type blfei1,
s_blfbw type blfbw,
s_blflr type blflr,
end of t_file.
SELECTION SCREEN *****
*---Selection Parameters.
selection-screen begin of block b1 with frame title title1.
parameters: p_xlfile like rlgrap-filename.
parameters: p_txfile type rlgrap-filename.
selection-screen end of block b1.
INITIALIZATION *****
initialization.
*---Initialize text fields for selection-screen.
title1 = 'Selection Parameters'.
AT SELECTION-SCREEN *****
at selection-screen.
at selection-screen on p_xlfile.
perform check_file using p_xlfile.
at selection-screen on value-request for p_xlfile.
perform select_file using p_xlfile.
START-OF-SELECTION *****
start-of-selection.
clear t_sheet.
refresh t_sheet.
*---Upload Spreadsheet.
perform read_file using p_xlfile.
*---Process data into formatted internal table.
perform format_data.
append t_file.
clear t_file.
endloop.
*---Download data to Text file.
perform download_data.
TOP-OF-PAGE *****
top-of-page.
perform top_of_page.
S-U-B-R-O-U-T-I-N-E-S *****
Form TOP_OF_PAGE
Calling the Standard Report Header
form top_of_page.
perform header using 'CREATE FILE FOR'
'VENDOR MASTER UPLOAD'
132.
skip 2.
endform. "TOP_OF_PAGE
Form check_file **
Checking the File entered **
data: p_filename type string.
form check_file using p_filename.
*---The entered File must be Excel spreadsheet.
data: l_length type i,
l_ext(4) type c.
l_length = strlen( p_xlfile ).
subtract 4 from l_length.
l_ext = p_xlfile+l_length(4).
translate l_ext to upper case.
if l_ext <> '.XLS'.
message e009 with 'Only Excel spreadsheets are supported'.
endif.
*---Check if File exits and not empty.
data: l_return(10) type c.
CALL FUNCTION 'WS_QUERY'
EXPORTING
FILENAME = p_filename
QUERY = 'FL'
IMPORTING
RETURN = l_return
EXCEPTIONS
INV_QUERY = 1
NO_BATCH = 2
FRONTEND_ERROR = 3
OTHERS = 4
IF l_return = space or l_return = '0'.
message e530(pj) with p_filename.
ENDIF.
endform. "CHECK_FILE
Form select_file **
form select_file using p_filename like rlgrap-filename.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
STATIC = 'X'
MASK = ',MS Excel (.xls),.xls.'
CHANGING
FILE_NAME = p_filename
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE e838(29) with p_filename.
ENDIF.
endform. "SELECT_FILE
Form read_file **
form read_file using p_filename like rlgrap-filename.
*---Display status message for User.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
TEXT = 'Uploading Spreadsheet'
*---Upload spreadsheet.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_filename
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 256
I_END_ROW = 65536
TABLES
INTERN = t_filedata
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF t_filedata[] is initial.
message i009 with 'NO DATA FOUND IN FILE' p_filename.
stop.
ENDIF.
sort t_filedata by row col.
endform. "READ_FILE
Form format_data **
form format_data.
data: l_index type i.
field-symbols: <fs1>.
*---Display status message for user.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
TEXT = ' Processing Data...'
loop at t_filedata.
l_index = t_filedata-col.
assign component l_index of structure t_sheet to <fs1>.
<fs1> = t_filedata-value.
at end of row.
append t_sheet.
clear t_sheet.
endat.
endloop.
refresh t_filedata.
free t_filedata.
endform. "FORMAT_DATA
Form download_data.
form download_data.
OPEN DATASET p_txfile for OUTPUT.
LOOP at t_file.
TRANSFER t_file to p_txfile.
ENDLOOP.
CLOSE DATASET p_txfile.
IF SY-SUBRC = 0.
WRITE: / 'Excel to Textfile for Vendor Master Upload: ', P_TXFILE.
ENDIF.
endform. "DOWNLOAD_DATA</b>Hi!
You don't need to program the 'translation' from a file into input data for RFBIKR00 yourself. SAP has done this, so that you can do this (nearly) without programming. If you need some special conversion rules, then you can add some coding, but most is possible without.
Have a look at transaction LSMW. It's not so complicated it looks at the first time. Just look at <a href="http://help.sap.com/saphelp_erp2004/helpdata/en/ad/2d54a41d7011d2b42e006094b944c8/frameset.htm">help</a> for the way to use LSMW.
Regards,
Christian
P.S.: sorry for lost your efforts, but you should switch to LSMW -
Please Help me How write the BDC program for the MIGO inbound Delivery
Please help me how to write bdc program for the MIGO Inbound Delivery in 4.7EE Version. Please help me.
Not in LSMW. Required call transaction or Session Method. Please help me.
MohanRun transaction BAPI . Select Logistics Execution/Shipping/InboundDelivery/SaveReplica.. You can use function module BAPI_INB_DELIVERY_SAVEREPLICA in your ABAP program.
Maybe you are looking for
-
The calendar on my iPhone 42 suddenly went blank and says No Events. How do I get my data back?
-
How to fetch the data from a standard report to a user defined report
Hi, i m using a standard report RFEBKA00 which uses CHAR300 variable(it is not used in selection screen). can u help me , to collect the data from CHAR300 and to use it in my own report. Message was edited by: jaya raman
-
Automatic Vendor MD record creation from Customer MD record
Hi Gurus, I have the following requirement: I have customers that are also vendors. I will create Customer Master Data via IDOCs. My client wants the system to create a vendor master data record for those customers automatically when the customer
-
Get rid of selected tiles in both start and application screens for all users.
Would DISM command for each provisioned tile applied on wim solve this issue? Thanks!
-
Slave screen setup for MacBook Pro
Trying to use a dell flat monitor as a slave screen with my MacBook Pro (v10.6.8). Have cords, monitor connected and on, but nothing is on "slave" screen. Would appreciate any tips on how to get it going. Thanks.