‎2006 Aug 07 11:41 PM
Can you tell me what is the file path of the file 'dataset' in the below code? I think it is stored in application server but not sure of the path. Is there any default path for such things?
Thank you very much!
-
report Z_test_BDC1
no standard page heading line-size 255.
include bdcrecx1.
parameters: dataset(132) lower case.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
*
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
*
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record,
data element: KUN16
KUNNR_001(016),
data element: KTOKD
KTOKD_002(004),
data element: NAME1_GP
NAME1_003(035),
data element: SORTL
SORTL_004(010),
data element: ORT01_GP
ORT01_005(035),
data element: LAND1_GP
LAND1_006(003),
data element: SPRAS
SPRAS_007(002),
data element: PSTLZ
PSTLZ_008(010),
data element: LZONE
LZONE_009(010),
end of record.
End generated data section ***
start-of-selection.
perform open_dataset using dataset.
perform open_group.
do.
read dataset dataset into record.
if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPMF02D' '0107'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KTOKD'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-KUNNR'
record-KUNNR_001.
perform bdc_field using 'RF02D-KTOKD'
record-KTOKD_002.
perform bdc_dynpro using 'SAPMF02D' '0110'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-SORTL'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNA1-NAME1'
record-NAME1_003.
perform bdc_field using 'KNA1-SORTL'
record-SORTL_004.
perform bdc_field using 'KNA1-ORT01'
record-ORT01_005.
perform bdc_field using 'KNA1-LAND1'
record-LAND1_006.
perform bdc_field using 'KNA1-SPRAS'
record-SPRAS_007.
perform bdc_field using 'KNA1-PSTLZ'
record-PSTLZ_008.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-LZONE'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_field using 'KNA1-LZONE'
record-LZONE_009.
perform bdc_transaction using 'VD01'.
enddo.
perform close_group.
perform close_dataset using dataset.
‎2006 Aug 07 11:46 PM
Where is the code for
perform open_dataset using dataset.
DATASET is entered on selection screen. Does not look like Logical file is used here but it will be helpful if you place code of this perform.
‎2006 Aug 07 11:46 PM
Where is the code for
perform open_dataset using dataset.
DATASET is entered on selection screen. Does not look like Logical file is used here but it will be helpful if you place code of this perform.
‎2006 Aug 07 11:48 PM
FORM OPEN_DATASET USING P_DATASET.
OPEN DATASET P_DATASET
FOR INPUT IN TEXT MODE
ENCODING DEFAULT.
IF SY-SUBRC <> 0.
WRITE: / TEXT-E00, SY-SUBRC.
STOP.
ENDIF.
ENDFORM.
Thanks Ashish.
‎2006 Aug 07 11:50 PM
The code shows that DATASET value is entered on selection screen. It should be entered with the path and file name.
Hope this answers your question.
‎2006 Aug 07 11:51 PM
I think it will be the value of the profile parameter DIR_HOME. Go to RZ11, enter DIR_HOME and do display. There you will see the full path of the home directory. That is where it should be.
‎2006 Aug 07 11:52 PM
You can also check the other DIR* profile parameters there and see which one it is.