how to create bdc for sales order ? if any one kow the
steps plz mail me at toamitshri@gmail.com
Answers were Sorted based on User's Feedback
Answer / bandivenkateswarlu
This is done by using the some process steps:
These steps are given below. and go through that steps.
1. Analyze the data from the local file or flat file.
2. Analyze the transaction.
3. Declaring the internal table (BDCDATA)
program: name of the module pool program name
dynpro: screen number.
dynbegin: it indicates for the new screen.
fname: name of the fields in the screen
fval : the values are assigned with the fields.
4.Transferring the data from the local file to internal table
5. Populating the internal table.
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / david carragher
USe IDOC_INPUT_ORDERS as mapping. The standard IDOC uses
BDC for posting, details will be found in the function
module.
Is This Answer Correct ? | 1 Yes | 1 No |
report ZTEST_BDC_MA
no standard page heading line-size 255.
*DATA: ld_file LIKE rlgrap-filename.
DATA: gd_file type string.
*Internal tabe to store upload data
TYPES: BEGIN OF t_record,
AUART LIKE VBAK-AUART,
VKORG LIKE VBAK-VKORG,
VTWEG LIKE VBAK-VTWEG,
SPART LIKE VBAK-SPART,
KUNNR LIKE KUAGV-KUNNR,
KUNNR1 LIKE KUAGV-KUNNR,
MATNR LIKE MARA-MATNR,
PRCTR LIKE COBL-PRCTR,
END OF t_record.
DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL
SIZE 0,
wa_record TYPE t_record.
*Text version of data table
TYPES: BEGIN OF t_uploadtxt,
AUART LIKE VBAK-AUART,
VKORG LIKE VBAK-VKORG,
VTWEG LIKE VBAK-VTWEG,
SPART LIKE VBAK-SPART,
KUNNR LIKE KUAGV-KUNNR,
KUNNR1 LIKE KUAGV-KUNNR,
MATNR LIKE MARA-MATNR,
PRCTR LIKE COBL-PRCTR,
END OF t_uploadtxt.
*Used to store BDC data
DATA: BEGIN OF bdc_tab OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.
*Used to stores error information from CALL TRANSACTION
Function Module
*DATA: BEGIN OF messtab OCCURS 0.
* INCLUDE STRUCTURE bdcmsgcoll.
*DATA: END OF messtab.
gd_file = ' Your workstation file name'.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gd_file
has_field_separator = 'X' "file is TAB delimited
TABLES
data_tab = it_record
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 NE 0.
write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD
FM'.
skip.
endif.
include bdcrecx1.
start-of-selection.
perform open_group.
Loop at it_record into wa_record.
perform bdc_dynpro using 'SAPMV45A' '0101'.
perform bdc_field using 'VBAK-AUART'
wa_record-auart.
perform bdc_field using 'VBAK-VKORG'
wa_record-vkorg.
perform bdc_field using 'VBAK-VTWEG'
wa_record-vtweg.
perform bdc_field using 'VBAK-SPART'
wa_record-spart.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KUAGV-KUNNR'
wa_record-kunnr.
perform bdc_field using 'KUWEV-KUNNR'
wa_record-kunnr1.
perform bdc_field using 'BDC_CURSOR'
'RV45A-KWMENG(01)'.
perform bdc_field using 'RV45A-MABNR(01)'
wa_record-matnr.
perform bdc_field using 'RV45A-KWMENG(01)'
' 1'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=ITEM'.
perform bdc_field using 'KUAGV-KUNNR'
wa_record-kunnr.
perform bdc_field using 'KUWEV-KUNNR'
wa_record-kunnr1.
perform bdc_field using 'BDC_CURSOR'
'RV45A-MABNR(01)'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=T\07'.
perform bdc_field using 'BDC_CURSOR'
'RV45A-KWMENG'.
perform bdc_field using 'RV45A-KWMENG'
' 1,000'.
perform bdc_field using 'VBAP-VRKME'
'TA'.
perform bdc_field using 'RV45A-ETDAT'
'10.04.2010'.
perform bdc_field using 'RV45A-PRGBZ'
'D'.
perform bdc_field using 'VBKD-PRSDT'
'10.04.2010'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=T\06'.
perform bdc_field using 'BDC_CURSOR'
'VBAP-ABGRS'.
perform bdc_field using 'DKACB-FMORE'
'X'.
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_CURSOR'
'COBL-PRCTR'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_field using 'COBL-PRCTR'
wa_record-prctr.
perform bdc_dynpro using 'SAPMV45A' '5003'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'BDC_CURSOR'
'KOMV-KSCHL(07)'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
perform bdc_field using 'KUAGV-KUNNR'
wa_record-kunnr.
perform bdc_field using 'KUWEV-KUNNR'
wa_record-kunnr1.
perform bdc_field using 'BDC_CURSOR'
'RV45A-MABNR(02)'.
perform bdc_transaction using 'VA01'.
endloop.
perform close_group.
Is This Answer Correct ? | 0 Yes | 4 No |
i have a requirement.there are 2 fields and one check box on my selection screen.initially first field sud be mandatory, when we click on check box the first field which was mandatory sud now be optional and second field sud be mandatory?please provide me the solution asap.Thank you
While doing bdc exp va01 transaction sometime in the item level data shows only 4 items and other times it will show 6 line items, how will you maintain this kind of screen resolutions scenerio? : abap bdc
What are the objects of the abap dictionary or what types of objects can be created in the abap dictionary? : abap data dictionary
How to put page-breaks in smartforms?
What is an update type with reference to a match code id?
Give few names of cluster tables in sap? Give few names of pooled tables in sap? give few names of transparent tables?
At selection-screen on Fields output?
What is personnel sub are
What are Lock Objects, and their Differences
what is template in smartform?
How do you run the scripts?
How will you process the Session method in Background?