Need bdc program for master recipe
Hi All,
Can any one please give me BDC code for Master Recipe Data Upload or is ther any standard program available to upload Master Recipe data?.
Regards
Sathish
Hi,
Can you share the same to me as well.
as I also have the same requirement
Thanks
Similar Messages
-
BDC program for Other Goods receipts
Hi all,
I need BDC program for Other goods receipts,
I have data in excel like material, batch id, qty, actual width, length, plant etc. i want to upload this in one short based on the movement type.
Thanks in advance.
ShankarHi MP Shankar,
This is a sample BDC program .Use the format to develop your own BDC program.First record your trasnaction and use that recorded program here.Pass your filename here.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_ifile TYPE dxfile-filename.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-002.
PARAMETERS: p_sess RADIOBUTTON GROUP g3 "create session
DEFAULT 'X' USER-COMMAND bdc,
p_ctu RADIOBUTTON GROUP g3. "call transaction
SELECTION-SCREEN END OF BLOCK b3.
DATA : BEGIN OF itab OCCURS 0,
str TYPE string,
END OF itab,
l_file TYPE string,
t_bdcdata TYPE STANDARD TABLE OF bdcdata,
wa_bdcdata LIKE LINE OF t_bdcdata.
AT SELECTION SCREEN ON VALUE REQUEST
Value request for the filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ifile.
PERFORM help_input_file.
START-OF-SELECTION.
CLEAR l_file.
l_file = p_ifile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_file
filetype = 'ASC'
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.
*Start new session
IF p_sess = 'X'.
PERFORM bdc_open.
ENDIF.
LOOP AT itab.
PERFORM creat_batch_input.
PERFORM bdc_insert.
IF p_ctu = 'X'.
CALL TRANSACTION 'SE38' USING t_bdcdata MODE 'A'.
ENDIF.
ENDLOOP.
IF p_sess = 'X'.
PERFORM bdc_close .
ENDIF.
*& Form bdc_open
text
--> p1 text
<-- p2 text
FORM bdc_open .
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = 'ZMUK'
user = sy-uname
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
group_is_locked = 4
holddate_invalid = 5
internal_error = 6
queue_error = 7
running = 8
system_lock_error = 9
user_invalid = 10
OTHERS = 11.
ENDFORM. " bdc_open
*& Form creat_batch_input
text
--> p1 text
<-- p2 text
FORM creat_batch_input .
use your own recorded program here.
PERFORM bdc_dynpro USING 'SAPLWBABAP' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=STRT'.
PERFORM bdc_field USING 'RS38M-PROGRAMM'
itab-str.
PERFORM bdc_field USING 'RS38M-FUNC_EDIT'
'X'.
PERFORM bdc_dynpro USING 'SAPLSLVC_FULLSCREEN' '0500'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=&F03'.
PERFORM bdc_dynpro USING 'SAPLWBABAP' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
PERFORM bdc_field USING 'RS38M-PROGRAMM'
itab-str.
PERFORM bdc_field USING 'RS38M-FUNC_EDIT'
'X'.
ENDFORM. " creat_batch_input
*& Form bdc_insert
text
--> p1 text
<-- p2 text
FORM bdc_insert .
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = 'SE38'
TABLES
dynprotab = t_bdcdata
EXCEPTIONS
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
OTHERS = 7.
ENDFORM. " bdc_insert
*& Form bdc_dynpro
text
-->P_0168 text
-->P_0169 text
FORM bdc_dynpro USING p_program TYPE any
p_dynpro TYPE any.
CLEAR wa_bdcdata.
wa_bdcdata-program = p_program.
wa_bdcdata-dynpro = p_dynpro.
wa_bdcdata-dynbegin = 'X'.
APPEND wa_bdcdata TO t_bdcdata.
ENDFORM. " bdc_dynpro
*& Form bdc_field
text
-->P_0179 text
-->P_0180 text
FORM bdc_field USING p_fnam TYPE any
p_fval TYPE any.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = p_fnam.
wa_bdcdata-fval = p_fval.
CONDENSE wa_bdcdata-fval.
APPEND wa_bdcdata TO t_bdcdata.
ENDFORM. " bdc_field
*& Form bdc_close
text
--> p1 text
<-- p2 text
FORM bdc_close .
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
not_open = 1
queue_error = 2
OTHERS = 3.
ENDFORM. " bdc_close
*& Form help_input_file
text
--> p1 text
<-- p2 text
FORM help_input_file .
DATA: lt_file_table TYPE filetable,
la_file_table LIKE LINE OF lt_file_table,
l_rc TYPE i,
l_pcdsn TYPE cffile-filename.
REFRESH lt_file_table.
CLEAR la_file_table.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
CHANGING
file_table = lt_file_table
rc = l_rc.
READ TABLE lt_file_table INTO la_file_table INDEX 1.
l_pcdsn = la_file_table-filename.
MOVE l_pcdsn TO p_ifile.
ENDFORM. " help_input_file -
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 -
Need to write BDC program for Transaction VA01(Sales order creation)
Dear Friends,
I need to write a BDC program for uploading data into sap from an excel sheet file. The data contain Material Description,Customer Name,Date of Delivery,Quantity,Unit of measure etc.
material desc customer date of delivery quantity unit of measure
abcdf xyz ltd 24.12.2011 2 4 gm
The transaction is VA01.How will I find the correct fields and related tables? What are the related fields needed in the transaction VA01.
Thanking you
Sacheen Pukhrambam
Moderator Message: Put some self-effort before posting your question. Thread locked.
Edited by: Suhas Saha on Nov 25, 2011 1:25 PMHello,
You could try using a BDC with VL04 but first preference would be to see if there are any BAPI functions (search for BAPI) that can do this.
If BUS2032 doesn't have an attribute that you want (eg shipping point) then sub-delegate to ZBUS2032 and add the attribute, it's straightforward. You just have to know how to determine the value programmatically.
regards
Rick Bakker
hanabi technology -
Need help with an SHDB BDC program for Change outbound delivery(VL02N).
I have created recording to change outbound delivery(VL02N). Steps are as below-
For VL02N recording 1st I have click on the header(F8) then dates tab.
Then insert line (+ button) then it shows 8 transport types.
I have chosen 7th transport type. In SHDB it shows BDC_CURSOR = '08/07'.
Then I have created BDC program for this recording, but it's not working,
because It is changing BDC_CURSOR value every time when we do SHDB or VL02N and in my code I have hard coded BDC_CURSOR = '08/07' .
Can anyone tell me how to get this BDC_CURSOR changed value. So that instead of hard coding this value I can select this value every time.
(FYI For this Screen name = SAPMSSY0 Screen No = 0120.)
Thanks.I have created recording to change outbound delivery(VL02N). Steps are as below-
For VL02N recording 1st I have click on the header(F8) then dates tab.
Then insert line (+ button) then it shows 8 transport types.
I have chosen 7th transport type. In SHDB it shows BDC_CURSOR = '08/07'.
Then I have created BDC program for this recording, but it's not working,
because It is changing BDC_CURSOR value every time when we do SHDB or VL02N and in my code I have hard coded BDC_CURSOR = '08/07' .
Can anyone tell me how to get this BDC_CURSOR changed value. So that instead of hard coding this value I can select this value every time.
(FYI For this Screen name = SAPMSSY0 Screen No = 0120.)
Thanks. -
In LSMW which method is exactly suits for Master Recipe Creation (TC-C201)
Hi All,
I am unable to find which method suits for Master Recipe Creation in LSMW.
Please send me in detail if any method suits.
Can any body help me in this.
Points will be awarded for correct answer which helps me come out of this problem.
Regards,
ShobhaHi shobha,
if there is code u have to do before uploading go for BDC or BAPI,
it not go for LSMW (recording method) --> in this its very difficult to code.
Thanks -
BDC Program for posting FI document
Hi everyone!
Anyone out there already made a BDC program for posting FI documents with this concept:
User will upload a spreadsheet file with the line items per row
User will input which TCODE user will use for posting
BDC program will then post the document using the line items in the spreadsheet file
I need to make a BDC program with that concept but having a hard time to think of a good algorithm to make my program very flexible.
Thanks!you can use batch input program RFBIBL00 to pasrk document. Please check these links for more information.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAGTFADM/CAGTFADM-FI.pdf
http://help.sap.com/printdocu/core/print46b/en/data/en/pdf/CAGTFADM-FI.pdf
Have a processing routine defined for the specific Idocs that come into SAP.
So, as and when the idocs are in, the routine triggers and you can codeappropriately in the routine for parking the idocs.
Check these threads
BAPI For Parking FI Document
Post FI Parked Documents
You can use message type INVOIC, IDoc Type INVOIC01/02 with process code INVF (FM IDOC_INPUT_INVOIC_FI) for FBV1 transaction.
See if there are any BAPI/FMs for parking an FI document.
1.. Use INVOIC01 IDOC with INVF process code (This works for Vendor Line Items only). I read the documentation somewhere that, this would work even if the line items are > 999
2.. BAPI_ACC_INVOICE_RECEIPT_POST (This works for Vendor Line Items only)
3.. BAPI_ACC_DOCUMENT_POST (Tax jurisdiction allocation not calculated properly)
4.. BAPI_ACC_GL_POSTING_POST (No tax line items allowed for this BAPI) -
Hi,
I would like to know the procedure to write a BDC program for Health plans(167) and in SHDB what will be the Tcode for it.
Points will be rewarded
Thanks and Regards
Chaitanya.Hi
Go to Tcode : SHDB.
Then give the Transaction code as PA30. Give the Infotype number as 0167.
Give the input field what u need to be uploaded.
Then save.
Then write the BDC Program for that.
Reward points if useful.
Regards,
N.L.Narayana -
Hi ALL,
Pls send me BDC program for FCH5 and FCH6 in function module it self..
How to write BDC the program in function module for FCH5 and FCH6..
ThanksHI ,
Thanks for your message,
I'm doing the one bank payment(Out Sourcing Cheque) (ZCITI)transaction so in that implementation i need the FCH5 and FCH6 BDC programs.
can you send me the sample code of BDC programs => thread locked for above tcodes bcz i haven't done BDC programs in Function modules.
Thanks in advance.
Edited by: kishan P on Oct 15, 2010 4:00 PM -
Need standrad program for vendor aging report
Hi
Need standrad program for vendor aging report.
Please reply me only standrad programs.
Point are sure.
Regards,
kumarHi Pankaj
sorry to say that this is not my required program.
I need vendor aging report like s_alr_87012178 tc leads to customer aging report.
Thanks for your effort.
points are awarded.
Regards,
kumar -
Problem in creating a BDC program for transaction cj20n(project sytem)
Hi all,
I am trying to create project,WBS element ,network and activity using a BDC program,
I am able to create to a recording for the transaction cj20n using tcode shdb but when i run the recording it doesnt run properly i am not able to create any thing.
I get error saying that a particular field doesnt exist on the screen.
Is possible to create a BDC program for transaction CJ20N ?
Also is there any other alternative apart from using a BAPI or a function module.
Thanks,
NishantHi,
Check below link for BAPIs of transaction cj20n.
[BAPI for cj20n|BAPI for CJ20N transaction]
Thanks,
Asit Purbey. -
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.
-
How to create a BDC program for given recording.
i have to create a BDC program for uploading a file.
currently i am using call function
CALL FUNCTION 'F4_FILENAME'just check out the code below it is for updating two transactions
types Declaration *
types: begin of t_tab1 ,
vendor(10),
material(18),
pur_org(4),
wglif(18),
end of t_tab1.
Data Declaration *
data : begin of it_tab5 occurs 0,
vendor(10),
material(18),
end of it_tab5.
**DATA : BEGIN OF IT_TAB6 OCCURS 0,
VENDOR(10),
MATERIAL(18),
END OF IT_TAB6.
data: it_tab1 type standard table of t_tab1 with header line.
data: wa_tab1 type t_tab1.
data: wa_tab2 type t_tab1.
data: it_tab3 like bdcdata occurs 0 with header line.
data: it_tab4 like bdcdata occurs 0 with header line.
data: it_tab2 type table of bdcmsgcoll with header line.
data: d_file_name like ibipparms-path,
d_file_name1 type string.
Start-of-selection *
start-of-selection.
FM for finding the flat file
call function 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
importing
file_name = d_file_name.
d_file_name1 = d_file_name.
******FM for uploading data from flat file into internal table
call function 'GUI_UPLOAD'
exporting
filename = d_file_name1
filetype = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = it_tab5
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.
endif.
End-of-selection *
end-of-selection.
sort it_tab5 by vendor.
loop at it_tab5.
perform bdc_dynpro using 'SAPLBG00' 0101 .
perform bdc_field using 'BDC_OKCODE' '/00' .
perform bdc_dynpro using 'SAPLBG00' 1000 .
perform bdc_field using 'BDC_OKCODE' '=BUCH' .
perform bdc_field using 'BDC_SUBSCR'
'SAPLBG00 1101KOPF_1000'.
perform bdc_field using 'GBGMK-GAART' '2' .
perform bdc_field using 'GBGMK-GAERB' 'X' .
perform bdc_field using 'BDC_SUBSCR'
'SAPLBG00 1103TAB_SUB_1000'.
perform bdc_field using 'BDC_CURSOR' 'GBGMP-LSTNR(01)' .
perform bdc_field using 'GBGMP-LSTNR(01)' it_tab5-material .
call transaction 'BGM1' using it_tab3 mode 'E' messages into it_tab2
refresh it_tab3.
wa_tab1-pur_org = 'ABCP'.
loop at it_tab2.
endloop.
perform bdc_dynpro using 'SAPMM06I' 0100 .
perform bdc_field using 'BDC_CURSOR' 'EINE-EKORG' .
perform bdc_field using 'BDC_OKCODE' '/00' .
perform bdc_field using 'EINA-LIFNR' it_tab5-vendor .
perform bdc_field using 'EINA-MATNR' it_tab5-material .
perform bdc_field using 'EINE-EKORG' wa_tab1-pur_org .
perform bdc_field using 'RM06I-NORMB' 'X' .
perform bdc_dynpro using 'SAPMM06I' 0101 .
perform bdc_field using 'BDC_CURSOR' 'EINA-WGLIF' .
perform bdc_field using 'BDC_OKCODE' '=BU' .
perform bdc_field using 'EINA-WGLIF' it_tab2-msgv1 .
call transaction 'ME12' using it_tab3 mode 'E'.
refresh it_tab3.
refresh it_tab2.
endloop.
*& Form BDC_DYNPRO
Start new screen
-->P_FNAM text
-->P_FVAL text
form bdc_dynpro using program
dynpro.
clear it_tab3.
it_tab3-program = program.
it_tab3-dynpro = dynpro.
it_tab3-dynbegin = 'X'.
append it_tab3.
endform. " BDC_DYNPRO
*& Form BDC_FIELD
Insert field
-->P_FNAM text
-->P_FVAL text
form bdc_field using fnam
fval.
clear it_tab3.
it_tab3-fnam = fnam.
it_tab3-fval = fval.
append it_tab3.
endform. " BDC_FIELD
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 14, 2008 6:20 PM -
Need sample programs for inbound & outbound interfaces in abap hr?
hi friends
i need sample programs for inbound & outbound interface programs in hr abap . any one send me pls
thanks & regards
deepurd&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
*& Report ZPROG65_11 *
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
REPORT zprog65_11 .
TABLES : lfa1.
TYPES : BEGIN OF ven ,
lifnr LIKE rf02k-lifnr,
bukrs LIKE rf02k-bukrs ,
ekorg LIKE rf02k-ekorg,
ktokk LIKE rf02k-ktokk,
name1 LIKE lfa1-name1,
sortl LIKE lfa1-sortl,
land1 LIKE lfa1-land1,
spars LIKE lfa1-spras,
akont LIKE lfb1-akont,
fdgrv LIKE lfb1-fdgrv,
waers LIKE lfm1-waers,
anred LIKE lfa1-anred ,
END OF ven .
DATA : t_ven TYPE TABLE OF ven WITH HEADER LINE ,
t_bdc LIKE TABLE OF bdcdata WITH HEADER LINE .
DATA : v_file TYPE string ,
v_temp TYPE i ,
v_lifnr(10) TYPE n,
v_hdate LIKE sy-datum.
DATA : c_tcode LIKE sy-tcode .u201Dvalue u2018XK01u2032.
PARAMETERS : p_file(30) DEFAULT u2018c:\vendor1_11.txtu2019,
p_group LIKE apqi-groupid.
START-OF-SELECTION .
MOVE p_file TO v_file .
PERFORM file_upload TABLES t_ven USING v_file .
v_hdate = sy-datum - 1.
CALL FUNCTION u2018BDC_OPEN_GROUPu2019
EXPORTING
client = sy-mandt
DEST = FILLER8
group = p_group
holddate = v_hdate
keep = u2018Xu2019
user = sy-uname
IMPORTING
QID =
EXCEPTIONS
client_invalid = 1
destination_invalid = 2
group_invalid = 3
OTHERS = 11
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT t_ven .
clear lfa1.
v_temp = 0.
MOVE t_ven-lifnr TO v_lifnr.
SELECT SINGLE * FROM lfa1 INTO lfa1 WHERE lifnr =
v_lifnr.
IF sy-subrc = 0.
WRITE :/ u2018foundu2019.
v_temp = 1.
else.
write: / u2018not foundu2019.
ENDIF.
IF v_temp = 0.
c_tcode = u2018xk01u2032.
PERFORM fill_ddc_table .
ELSEIF v_temp = 1.
c_tcode = u2018xk02u2032.
PERFORM fill_bdc_table .
ENDIF.
CALL FUNCTION u2018BDC_INSERTu2019
EXPORTING
tcode = c_tcode
TABLES
dynprotab = t_bdc
EXCEPTIONS
internal_error = 1
OTHERS = 7.
REFRESH t_bdc .
ENDLOOP .
CALL FUNCTION u2018BDC_CLOSE_GROUPu2019
EXCEPTIONS
not_open = 1
queue_error = 2
OTHERS = 3.
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
*& Form file_upload
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
u2013>P_T_VEN text
u2013>P_V_FILE text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
FORM file_upload TABLES p_tven STRUCTURE t_ven
USING p_vfile.
CALL FUNCTION u2018GUI_UPLOADu2019
EXPORTING
filename = p_vfile
filetype = u2018ASCu2019
has_field_separator = u2018Xu2019
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = p_tven
EXCEPTIONS
file_open_error = 1
file_read_error = 2
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.
ENDIF.
ENDFORM. u201D file_upload
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
*& Form FILL_DDC_TABLE
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
u2013> p1 text
<u2013 p2 text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
FORM fill_ddc_table .
SCREN 100
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180100u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-LIFNRu2019.
t_bdc-fval = t_ven-lifnr .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-BUKRSu2019.
t_bdc-fval = t_ven-bukrs.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-EKORGu2019.
t_bdc-fval = t_ven-ekorg.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-KTOKKu2019.
t_bdc-fval = t_ven-ktokk.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
110
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180110u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-NAME1u2032.
t_bdc-fval = t_ven-name1 .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-SORTLu2019.
t_bdc-fval = t_ven-sortl.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-LAND1u2032.
t_bdc-fval = t_ven-land1.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-SPRASu2019.
t_bdc-fval = t_ven-spars.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
120
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180120u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
130
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180130u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018=ENTRu2019.
APPEND t_bdc. CLEAR t_bdc.
210
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180210u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFB1-AKONTu2019.
t_bdc-fval = t_ven-akont .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFB1-FDGRVu2019.
t_bdc-fval = t_ven-fdgrv.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
215
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180215u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
220
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180220u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
310
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180310u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFM1-WAERSu2019.
t_bdc-fval = t_ven-waers .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
320
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180320u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018=UPDAu2019.
APPEND t_bdc. CLEAR t_bdc.
ENDFORM. u201CFILL_DDC_TABLE
u201D FILL_DDC_TABLE
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
*& Form FILL_BDC_TABLE
&u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014
text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
u2013> p1 text
<u2013 p2 text
u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014u2014-
FORM fill_bdc_table .
SCREN 101
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180101u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-LIFNRu2019.
t_bdc-fval = t_ven-lifnr .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-BUKRSu2019.
t_bdc-fval = t_ven-bukrs.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018RF02K-EKORGu2019.
t_bdc-fval = t_ven-ekorg.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
110
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180110u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018lfa1-anredu2019.
t_bdc-fval = t_ven-anred .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-NAME1u2032.
t_bdc-fval = t_ven-name1 .
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-SORTLu2019.
t_bdc-fval = t_ven-sortl.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-LAND1u2032.
t_bdc-fval = t_ven-land1.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018LFA1-SPRASu2019.
t_bdc-fval = t_ven-spars.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018/00u2032.
APPEND t_bdc. CLEAR t_bdc.
300
t_bdc-program = u2018SAPMF02Ku2019.
t_bdc-dynpro = u20180300u2032.
t_bdc-dynbegin = u2018Xu2019.
APPEND t_bdc. CLEAR t_bdc.
t_bdc-fnam = u2018BDC_OKCODEu2019.
t_bdc-fval = u2018=YESu2019.
APPEND t_bdc. CLEAR t_bdc.
ENDFORM. u201D FILL_BDC_TABLE
Best Regards -
BAPI or FM or Standard BDC program for Production version creation (C223)
Hi All,
Is there BAPI or FM or Standard BDC program for Production version creation? Please help me.
Thanks & Regards
SanthoshHi,
Try this FM "CO_OCM_CREATE_PROD_VERSION"
Regards,
Smart
Maybe you are looking for
-
How do I change the keypad From a split key view to having them all together?
How do I change the keypad From a split key view to having them all together?
-
Time out error in internal table
HI , i am using one internal table as below . loop at i_main. i_temp-field0 = i_main-field0. loop at i_main into wa_main where some conditions. i_temp-field1 = wa_main-field1 * wa_field-field2. endloop. append i_temp. endloop. so here in that calcula
-
I have been trying to update settings to allow my aol mail to automatically refresh when new messages come in, vs having to click on the "inbox" in order to view new messages. I followed aol's troubleshooting steps to allow for this, and I finally go
-
Hi, all -- I'm thinking of buying a W530 with the nicer minidock (433830U). Does anyone know how many monitors (and of what sort) this combination will support?? It seems like the DVI on this minidock is single, which I think means 1920x1200 ... and
-
Adobe Air Application Crash After installation
Hi, We have developed a windows application "DsNetHTML5Player" in Adobe Air which shows HTML pages in sequence using <mx:HTML> control. When I run application in "Flash Builder" all plays fine.After creating its build and installing on system (Window