09-23-2014 7:02 AM
Dear All,
I want to upload data to a standard transaction, which data is stored in ztable, and i want to upload that data directly from ztable to standard transaction. please guide me.
Thanks in advance.
Regards,
Shubhada Deshmukh.
09-23-2014 7:06 AM
Hi,
Below are the possible options:
1. Write a program and call respective BAPI to update a standard transaction
2. Write a program and call BDC
3. Download the data of Z table and run LSMW for standard transaction
Regards,
VS
09-23-2014 7:10 AM
Hello ,
You can use BAPI for that transaction or BDC...
For relevant BAPI for your transaction search on Google
or
For BDC use T-code : SHDB for recording the transaction
Ask if more help needed
09-23-2014 7:14 AM
Hi Shubhada ;
It depends on how many records you are having , so you can use BDC or upload(lsmw) method.
Regards .
Özgün
09-23-2014 7:19 AM
Hi all,
Thanks for your help. It will be helpful for me. But i want to know that, can we upload data directly from ztable using BDC or not?
Regards,
Shubhada
09-23-2014 7:20 AM
Dear
In your loop on it_itab create a line count value which is of type 'I'.
loop at it_itab into wa_itab.
lv_line = lv_line + 1.
And in your code replace (01) with (lv_line) value.
perform bdc_field using 'BDC_CURSOR'
'ZRAKESH_BANK-ZBANK_CONTACT(lv_line)'.
perform bdc_field using 'ZRAKESH_BANK-ZBANK_ID(lv_line)'
wa_itab-zbank_id.
endloop.
----------
you can use
REPORT ZUPLOAD.
TYPE-POOLS: truxs.
PARAMETERS: p_file TYPE rlgrap-filename.
TYPES: BEGIN OF ty_datatab,
col1(30) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
col4(30) TYPE c,
END OF ty_datatab,
tt_datatab TYPE STANDARD TABLE OF ty_datatab.
DATA: lt_datatab type tt_datatab,
ls_datatab type ty_datatab.
DATA: it_exraw TYPE truxs_t_text_data.
* At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'P_FILE'
IMPORTING
file_name = p_file.
START-OF-SELECTION.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
* I_FIELD_SEPERATOR =
i_line_header = 'X'
i_tab_raw_data = it_exraw " WORK TABLE
i_filename = p_file
TABLES
i_tab_converted_data = lt_datatab[]
EXCEPTION
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards
Using Insert , update the records to the table.