How to upload data to a "CLOB" datatype field in a database table
Using sqlldr what is the correct way to upload character data (far greater than the 4000 Bytes allowed in varchar2)?
setting the table field name datatype to clob and then using the field name against a large dataset in the control file I get the error that the input record (field) is to large.. adding "clob" after the table field name in the sqlldr control file just gives me a syntax error..
Running Oracle 9.2.0.6 on Solaris 9
user511518,
I think you're in the wrong forum. Perhaps you should start with this Web page:
http://www.oracle.com/technology/products/database/utilities/index.html
Look for the SQL*Loader links.
Good Luck,
Avi.
Similar Messages
-
How to Find the Data Type of the Field In a Database Table
Hi Experts,
I'm currently working on a program which needs to find out the data type of the given field in a database table. In addition to accessing DD03L directly, is there any other workaround such as function module to help me achieve this? It would be helpful if a demo example could be provided.
Thanks a lot.Hi,
Use this..
DESCRIBE FIELD dobj TYPE typ.
write typ.
type will contain the data type of the object.
and check this thread also....
Re: How to get datatype of fields in dynamic structures
Cheers,
Simha.
Reward all the helpful answers.. -
Importing and Exporting Data with a Clob datatype with HTML DB
I would like to know what to do and what to be aware of when Importing and Exporting data with a Clob Datatype with HTML DB?
Colin - what kind of import/export operation would that be, which pages are you referring to?
Scott -
HOW TO UPLOAD DATA FROM EXCEL TO INTERNALTABLE
HI,
HOW TO UPLOAD DATA FROM EXCEL TO INTERNALTABLE? & WITH EXAMPLE.hi,
chk this, put the data into an excel file.
fields inside it are name and age.
sample excel sheet.
coloumn 1 is name and column 2 is age
name age
A 8
C 13
D 55
DATA : int_excel LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
data : record like db_name_age occurs 0 with header line.
DATA : v_start_col TYPE i VALUE '1', "starting col
v_start_row TYPE i VALUE '1', " starting row
v_end_col TYPE i VALUE '2', " total columns
v_end_row TYPE i VALUE '10'. "total no of record
FORM f_upload .
CLEAR : int_excel, int_excel[].
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = wf_filename
i_begin_col = v_start_col
i_begin_row = v_start_row
i_end_col = v_end_col
i_end_row = v_end_row
TABLES
intern = int_excel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
*Message is 'Unable to upload data from ' wf_filename.
MESSAGE e169(zm050) WITH wf_filename.
ELSE.
SORT int_excel BY row col.
REFRESH : record.
CLEAR : record.
LOOP AT int_excel.
CASE int_excel-col. "go thru each column.
WHEN 1.
record-name = int_excel-value.
WHEN 2.
record-age = int_excel-value.
ENDCASE.
AT END OF row.
APPEND record.
CLEAR record.
ENDAT.
ENDLOOP.
*inserting into table
modfiy db_name_age from table record.
ENDIF.
<i><b>ANOTHER EXAMPLE</b></i>
TYPE-POOLS truxs.
types: begin of t_tab,
col1(5) type c,
col2(5) type c,
col3(5) type c,
end of t_tab.
data : itab type standard table of t_tab,
wa type t_tab.
data it_type type truxs_t_text_data.
parameter p_file type rlgrap-filename.
data ttab type tabname.
at selection-screen on value-request for p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
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_type
i_filename = p_file
tables
i_tab_converted_data = itab[]
EXCEPTIONS
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.
end-of-selection.
loop at itab into wa.
write : wa-col1,
wa-col2,
wa-col3.
endloop.
rgds,
anver
<i>if hlped pls mark points</i> -
How to upload data from excel to SAP and options to be used
How to upload data from excel to SAP and options to be used
thank you,
Regards,
Jagrut Bharatkumar shuklaHi Jagrut,
You can use gui_upload.
chk the sample program mentioned below.
REPORT ZFTP .
DATA: BEGIN OF I_FILE OCCURS 0,
DATA(2000) TYPE C,
END OF I_FILE.
DATA: BEGIN OF I_FILE2 OCCURS 0,
DATA(2000) TYPE C,
END OF I_FILE2.
DATA: W_COUNT TYPE I.
PARAMETERS: P_FILEN TYPE STRING,
P_FILE2 TYPE STRING,
P_NUM(4) TYPE N..
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILEN.
PERFORM F_FILE_GET USING P_FILEN TEXT-G01.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE2.
PERFORM F_FILE_GET USING P_FILE2 TEXT-G01.
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = P_FILEN
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = I_FILE
IF SY-SUBRC <> 0.
MESSAGE E024(Z1).
ENDIF.
LOOP AT I_FILE.
W_COUNT = W_COUNT + 1.
IF NOT W_COUNT > P_NUM.
MOVE I_FILE TO I_FILE2.
APPEND I_FILE2.
ENDIF.
ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = P_FILE2
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = I_FILE2
FIELDNAMES =
*& Form F_FILE_GET
text
-->P_P_FILEN text
-->P_TEXT_G01 text
FORM F_FILE_GET USING L_FILENA L_TEXT.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = ' '
DEF_PATH = ' '
MASK = ',.,*.TXT.'
MODE = 'O'
TITLE = L_TEXT
IMPORTING
FILENAME = L_FILENA
rc =
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Reward if helpful.
Regards,
Harini.S -
How to upload data into IT0000 using ABAP-HR program
Hello,
I'm required to upload data into multiple infotypes [IT000, 0001, 0002, etc] using single input text file. Can anyone able to guide me, how to upload data into IT0000 using ABAP program ?
Thanks in advance.
Regards
Prabhakar.
Message was edited by:
Prabhakara MuthyalExample code for HR_MAINTAIN_MASTERDATA to COPY IT0002
DATA: INT_0002_FINAL TYPE STANDARD TABLE OF PA0002 WITH HEADER LINE.
DATA: VALUES LIKE PPROP OCCURS 10 WITH HEADER LINE,
RETURN LIKE BAPIRETURN1,.
LOOP AT INT_0002_FINAL.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-PERNR'.
VALUES-FVAL = INT_0002_FINAL-PERNR.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-BEGDA'.
VALUES-FVAL = INT_0002_FINAL-BEGDA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-ENDDA'.
VALUES-FVAL = INT_0002_FINAL-ENDDA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-nachn'.
VALUES-FVAL = INT_0002_FINAL-NACHN.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-gblnd'.
VALUES-FVAL = INT_0002_FINAL-GBLND.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-vorna'.
VALUES-FVAL = INT_0002_FINAL-VORNA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-rufnm'.
VALUES-FVAL = INT_0002_FINAL-RUFNM.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-name2'.
VALUES-FVAL = INT_0002_FINAL-NAME2.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-inits'.
VALUES-FVAL = INT_0002_FINAL-INITS.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-famst'.
VALUES-FVAL = INT_0002_FINAL-FAMST.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-gbdat'.
VALUES-FVAL = INT_0002_FINAL-GBDAT.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-sprsl'.
VALUES-FVAL = INT_0002_FINAL-SPRSL.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-anzkd'.
VALUES-FVAL = INT_0002_FINAL-ANZKD.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-natio'.
VALUES-FVAL = INT_0002_FINAL-NATIO.
APPEND VALUES.
* maintain master data
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = INT_0002_FINAL-PERNR
ACTIO = 'COP'
BEGDA = INT_0002_FINAL-BEGDA
* ENDDA = INT_0002_FINAL-ENDDA
SUBTY = SPACE
NO_ENQUEUE = SPACE
DIALOG_MODE = '0'
TCLAS = 'A'
IMPORTING
RETURN1 = RETURN
TABLES
PROPOSED_VALUES = VALUES
* MODIFIED_KEYS =
EXCEPTIONS
OTHERS = 1.
IF RETURN IS INITIAL.
WRITE:/' Done....'.
ELSE.
WRITE:/ RETURN-ID, RETURN-TYPE, RETURN-NUMBER, RETURN-MESSAGE_V1, RETURN-MESSAGE_V2, RETURN-MESSAGE_V3, RETURN-MESSAGE_V4.
ENDIF.
CLEAR VALUES.
REFRESH VALUES.
ENDLOOP. -
How to upload data into form of Oracle EBS R12 using ATS ver 9.0
Hi experts,
Could you please guide me how to upload data into form on Oracle EBS R12 using Oracle Application Testing Suite verson 9.(The simpliest way)
For example: I need to create user account on Oracle EBS. Normally, I use Dataloader to upload the data, however it just can upload one by one record, cannot upload multi record at same time. Moreover if the performance of server is low, so I will get the issue when using dataloader.
Thanks in advance
Best Regards
HieuHi you can create Virtual users to enter data. Note than you have to name the objects accordingly.
For Example default recording provided by Open script is ObjectNAME_(Index No of the object).
when you record one iteration the name of any object would be ObjectNAME_(0)
You can then create virtual users so the index will increment as the total number of Virtual users increases. Also you have to handle which row of your test data would get mapped to which Virtual user in the script run session.
Thanks -
How to upload datas in excel sheet through BDC
Hi,
I know how to upload datas in Text format through BDC...Suppose even when datas are in .xls format,I saved that file as Text(tab delimited) format...then file become text format and it can be easily uploaded....
So, I want to know How to upload datas in excel sheet through BDChi,
try this Example, hope useful to u, assign me point.
report ZMSV1_BDC_CALL
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: BUKRS
BUKRS_001(004),
data element: KTOKK
KTOKK_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: BANKS
BANKS_01_008(003),
data element: BANKK
BANKL_01_009(015),
data element: BANKN
BANKN_01_010(018),
end of record.
End generated data section ***
data: itab like record occurs 0 .
data: it_bdc type bdcdata occurs 0 with header line.
data: it_msg type bdcmsgcoll occurs 0 with header line.
parameter p_file type rlgrap-filename default 'c:\vendor.txt' obligatory
start-of-selection.
perform open_dataset using p_file.
perform open_group.
*perform close_group.
*perform close_dataset using dataset.
*& Form open_dataset
text
-->P_P_FILE text
form open_dataset using p_p_file.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = p_file
FILETYPE = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
TABLES
data_tab = itab
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
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.
endform. " open_dataset
*& Form open_group
text
--> p1 text
<-- p2 text
form open_group .
loop at itab into record.
perform bdc_dynpro using 'SAPMF02K' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-BUKRS'
record-BUKRS_001.
perform bdc_field using 'RF02K-KTOKK'
record-KTOKK_002.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-ORT01'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
record-NAME1_003.
perform bdc_field using 'LFA1-SORTL'
record-SORTL_004.
perform bdc_field using 'LFA1-ORT01'
record-ORT01_005.
perform bdc_field using 'LFA1-LAND1'
record-LAND1_006.
perform bdc_field using 'LFA1-SPRAS'
record-SPRAS_007.
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-KOINH(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'LFBK-BANKS(01)'
record-BANKS_01_008.
perform bdc_field using 'LFBK-BANKL(01)'
record-BANKL_01_009.
perform bdc_field using 'LFBK-BANKN(01)'
record-BANKN_01_010.
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 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
call transaction 'FK01' using it_bdc mode 'A' update 'S'
messages into it_msg.
write:/ sy-subrc.
perform message_formatwrite.
refresh it_bdc.
clear it_bdc.
endloop.
endform. " open_group
*& Form message_formatwrite
text
--> p1 text
<-- p2 text
form message_formatwrite .
data:l_msg(10).
loop at it_msg.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = sy-langu
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = l_msg
EXCEPTIONS
NOT_FOUND = 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.
endloop.
endform. " message_formatwrite
*& Form bdc_dynpro
text
-->P_0112 text
-->P_0113 text
form bdc_dynpro using value(p_0112)
value(p_0113).
it_bdc-program = p_0112.
it_bdc-dynpro = p_0113.
it_bdc-dynbegin = 'X'.
append it_bdc.
clear it_bdc.
endform. " bdc_dynpro
*& Form bdc_field
text
-->P_0117 text
-->P_0118 text
form bdc_field using value(p_0117)
value(p_0118).
it_bdc-fnam = p_0117.
it_bdc-fval = p_0118.
append it_bdc.
clear it_bdc.
endform. " bdc_field
Regards
fareedas -
Dear Hussien,
I have the customer master list . now i want to upload, can u please guide me how to achieve this?
There is two tables
1. hz_parties
2. hz_cust_accounts_all
Can anyone guide me how to upload data in the telesales module ?
i know throught sqlldr it is possible but there many fields which i don't know about in the tables so any help pls
Edited by: Mohammed Taj on May 7, 2009 1:15 PMHi Mohammed, I would recommend that before looking to interface data to Oracle Apps or anything to do with the app really that you always check the user guides/ manuals first as they are often a good starting point. For customers check the AR guide. This is found at:
http://www.oracle.com/technology/documentation/applications.html
Select your version of OA and then view the AR user guide.
There is a section that explains how customers are managed in OA, the program Customer Interface which can be used to interface customers into OA and towards the end of the guide there is a description of the interface tables which you will need to populate with your customer source data.
Regards Cel -
How to upload data for me01 using lsmw recording method
*dear expert please tell me the complete procedure for how to upload data in me01 transaction using lsmw recording method.
Moderator Message: Duplicate post locked.
Edited by: Vinod Kumar on May 8, 2011 7:56 PMHi,
To be honest I don't understand your question. When You execute LSMW and create project, then all steps are shown in a very clear way with good description. With which one you have problems?
Best regards
Marcin Cholewczuk -
How to upload data in to custom control
hello freinds can any one tell me how to upload data into cutom control area using bdc, for example when i record the transaction 'ac02', i am able to enter the long text column but when i generate i am unable to see which field the data is saved , so that i am unable to go further
can any one tell what is the process
bye
afzalHi ..
Long text are a little pain in BDC...they are maintained separately in the system...
Where you are filling the long text ..there would be an icon for full screen ...click on tht ...Click Goto-> Header ...
There would be four details on top clubbed together ...note down these...
You have to pass <b>Text ID Text Name Text Object</b> for every text you create tht u create through FM save_text
Below is code written by me for uploading long texts for material but the logic remains the same:
tables : t100.
data: begin of record OCCURS 0,
data element: MTART
MTART_001(004),
data element: XFELD
KZSEL_01_002(001),
data element: XFELD
KZSEL_10_003(001),
data element: WERKS_D
WERKS_004(004),
data element: LGORT_D
LGORT_005(004),
data element: MAKTX
MAKTX_006(040),
data element: MEINS
MEINS_007(003),
data element: MATKL
MATKL_008(009),
data element: BISMT
BISMT_009(018),
data element: LABOR
LABOR_010(003),
data element: MAKTX
MAKTX_011(040),
data element: MEINS
MEINS_012(003),
data element: LGPBE
LGPBE_013(010),
data element: DATTP
IPRKZ_014(001),
<b>length(1000),</b>
end of record.
*types : begin of str_orig,
line(256) type c,
end of str_orig.
*data : it_orig type standard table of str_orig with default key,
wa_orig type str_orig,
data : text_length TYPE i,
loop_times TYPE i,
char_pos_last TYPE i,
char_pos_curr TYPE i,
no_lines TYPE i.
DATA : VALUE TYPE RMMG1-MATNR.
DATA : NUMBER TYPE RMMG1-MATNR.
data : theader type thead ,
ITAB type standard table of TLINE with default key,
wa type tline.
data itabrec like table of record with header line.
data : bdcdata type standard table of bdcdata with header line.
data : messtab type standard table of bdcmsgcoll with header line.
data mstring(300).
start-of-selection.
<b>theader-tdobject = 'MATERIAL'.
*header-tdname =
theader-tdid = 'GRUN'.
theader-tdform = 'SYSTEM'.
theader-tdspras = 'E'.</b>
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = ''
FILETYPE = 'DAT'
TABLES
DATA_TAB = itabrec.
*perform open_dataset using dataset.
*perform open_group.
loop at itabrec.
refresh bdcdata.
refresh messtab.
perform map_data.
call transaction 'MM01' using bdcdata mode 'N' update 'S' messages into messtab.
<b>text_length = strlen( itabrec-length ).
char_pos_curr = 0.
char_pos_last = 0.
loop_times = text_length DIV 72.
loop_times = loop_times + 1.
DO loop_times TIMES.
char_pos_curr = char_pos_curr + 72.</b> wa-tdline =
itabrec-length+char_pos_last(72).
wa-tdformat = '* '.
APPEND wa to itab.
clear wa.
char_pos_last = char_pos_curr - 1.
enddo.
wa-tdformat = ''.
*wa-tdline = ITABREC-LENGTH.
*append wa to itab.
<b>
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = SY-MSGV1
IMPORTING
OUTPUT = NUMBER .
THEADER-TDNAME = NUMBER.</b>
<b>CALL FUNCTION 'SAVE_TEXT'</b> EXPORTING
CLIENT = SY-MANDT
HEADER = THEADER
INSERT = 'X'
SAVEMODE_DIRECT = 'X'
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = itab
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear itab.
perform get_messages.
endloop.
End generated data section ***
*start-of-selection.
*perform open_dataset using dataset.
*do.
*read dataset dataset into record.
*if sy-subrc <> 0. exit. endif.
form map_data.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MTART'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RMMG1-MTART'
itabrec-MTART_001.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(10)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
itabrec-KZSEL_01_002.
perform bdc_field using 'MSICHTAUSW-KZSEL(10)'
itabrec-KZSEL_10_003.
perform bdc_dynpro using 'SAPLMGMM' '0080'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-LGORT'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RMMG1-WERKS'
itabrec-WERKS_004.
perform bdc_field using 'RMMG1-LGORT'
itabrec-LGORT_005.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'MAKT-MAKTX'
itabrec-MAKTX_006.
perform bdc_field using 'BDC_CURSOR'
'MARA-LABOR'.
perform bdc_field using 'MARA-MEINS'
itabrec-MEINS_007.
perform bdc_field using 'MARA-MATKL'
itabrec-MATKL_008.
perform bdc_field using 'MARA-BISMT'
itabrec-BISMT_009.
perform bdc_field using 'MARA-LABOR'
itabrec-LABOR_010.
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'MAKT-MAKTX'
itabrec-MAKTX_011.
perform bdc_field using 'BDC_CURSOR'
'MARD-LGPBE'.
perform bdc_field using 'MARA-MEINS'
itabrec-MEINS_012.
perform bdc_field using 'MARD-LGPBE'
itabrec-LGPBE_013.
perform bdc_field using 'MARA-IPRKZ'
itabrec-IPRKZ_014.
endform.
form get_messages.
loop at messtab.
select single * from t100 where sprsl = messtab-msgspra and
arbgb = messtab-msgid and
msgnr = messtab-msgnr.
if sy-subrc = 0.
mstring = t100-text.
if mstring CS '&'.
replace '&' with messtab-msgv1 into mstring.
replace '&' with messtab-msgv2 into mstring.
replace '&' with messtab-msgv3 into mstring.
replace '&' with messtab-msgv4 into mstring.
endif.
condense mstring.
write :/ mstring(300) color 2 intensified off.
else.
write : messtab.
endif.
endloop.
endform.
form bdc_dynpro using program dynpro.
clear bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
append bdcdata.
endform.
form bdc_field using fnam fval.
clear bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
append bdcdata.
endform.
ANy other help u need, lemme know!!
Message was edited by:
shweta soni -
How to upload data into Classification-MM02 for each MATNR By using BAPI
Hi all
How to upload data into characterstic value in classification- MM02 for each MATNR by using BAPI.Hi Siva,
Please try BAPI BAPI_OBJCL_CHANGE.
The object key should be material number and object table should be MARA.
Regards
Hiren K.Chitalia -
How to upload data into ztables
Hi all,
How to upload data into ztables
plz sent the detail description as well sa sample programsHi Narendra,
Sample code to update the Z db table :
REPORT yupload.
TABLES ybtab.
DATA itab LIKE ybtab OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
filename = 'C:\data.txt'
filetype = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
TABLES
data_tab = itab
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
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.
ELSE.
INSERT ybtab FROM TABLE itab.
ENDIF.
Schedule this program as a Background Job with required time paramters .
Regards,
Ramganesan K. -
How to delete data from single field in a database table?
Hi guys,
Plz suggest me How to delete data from single field in a database table?
thnks,
pavanhi
in addition to abv details..chk this:
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
http://dev.mysql.com/doc/maxdb/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm
regards,
madhu -
How to Select data using same column name from 3 remote database
Hi,
Can anyone help me on how to get data with same column names from 3 remote database and a single alias.
Ex.
SELECT *
a.name, b.status, SUM(b.qty) qantity, MAX(b.date) date_as_of
FROM
*((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)a,*
*(table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)b)*
WHERE b.dept = 'finance'
AND a.position = 'admin'
AND a.latest = 'Y' AND (b.status <> 'TRM') AND b.qty > 0;
GROUP BY a.name, b.status ;
NOTE: the bold statements is just an example of what I want to do but I always gets an error beacause of ambiguous columns.
Thanks in advnce. :)
Edited by: user12994685 on Jan 4, 2011 9:42 PMuser12994685 wrote:
Can anyone help me on how to get data with same column names from 3 remote database and a single alias.Invalid. This does not make sense and breaks all scope resolution rules. And whether this is in a single database, or uses tables across databases, is irrelevant.
Each object must be uniquely identified. So you cannot do this:
select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a3 objects cannot share the same alias. Example:
SQL> select * from (dual, dual) d;
select * from (dual, dual) d
ERROR at line 1:
ORA-00907: missing right parenthesisYou need to combine the objects - using a join or union or similar. So it will need to be done as follows:
SQL> select * from (select * from dual d1, dual d2) d;
select * from (select * from dual d1, dual d2) d
ERROR at line 1:
ORA-00918: column ambiguously definedHowever, we need to have unique column names in a SQL projection - so the join of the tables need to project a unique set of columns. Thus:
SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
DUM DUM
X X
SQL> I suggest that you look closely at what scope is and how it applies in the SQL language - and ignore whether the objects referenced are local or remote as it has no impact to fundamentals of scope resolution.
Maybe you are looking for
-
SRM PO- BBP_DOC_CHANGE_BADI - Code not effective when the SRM PO is created
Hi Experts, We are using SRM 5.0 Classic and Extended classic scenario and the SRM local PO(Extended classic scenario) is created for special cateogries only. The SRM Local PO is created automatically after the SC is completely approved. The SC(one l
-
Creating variables in OLAP DML - 11g
Hi Experts, My understanding is that the OLAP metadata is exposed to GUI via formulas only. if I create a variable in OLAP DML worksheet, is it possible to expose it to cube view, and awm by formulas/programs etc? Kind Regards
-
Distribute spacing value needs to be sticky
The Distribute Spacing value needs to remain sticky based on the last value I gave it. If I have previously distributed a series of objects to a set spacing value and then set it back to Auto prior to distributing another series of objects the value
-
Hello .... I am using forms and using one field for user to input data ... depending on this data , i need to fetch the records ... Enter Info :- Computer science in Aurangabad Now, i need to search the info which contains any of this words.... my se
-
Inserting text after a picture
hi I hve inserted a picture fro my camera role into pages, i now with to continue on with text however it will not let me type, when pressing the screen for the bar i get a paste option, i have already pasted the picture and dont need to paste it aga