Table field length problem
Hi Team,
We r tring to create table with field length 250 and 'CHAR' type and one more field 'STRING 'for unlimited length.While creating table entries ,it is tsking only 130 length for all fields.it is not taking 250 characters for 250 length field.and it is not taking unlimited length for String field.Plz let me know.
Hello Mohan,
CHAR 250 is right. i am not facing any problem.
can you please explain in detail what you have done and what error you are getting.
Regards,
Sujeet
Edited by: Sujeet Mishra on Dec 2, 2009 4:42 AM
Similar Messages
-
ALV (Factory class) field length problem
Hi experts!
I build an ALV report using the Factory method. But I can't set the field length.
When I set the field length in a column attributes it doesn't change nothing
What is the problem?
My column attributes are like that:
TRY.
lr_column ?= lr_columns->get_column( 'NAME1' ).
lv_text_s = text-103.
lv_text_m = text-103.
lv_text_l = text-103.
lr_column->set_long_text( text-103 ).
lr_column->set_short_text( lv_text_s ).
lr_column->set_medium_text( lv_text_m ).
<b> lr_column->set_output_length( 30 ) .</b>
lr_column->set_active_for_rep_interface( gc_default ).
CATCH cx_salv_not_found.
ENDTRY.
Thanks forehead,
DaniHi,
In ur fieldcat populate the output length field.
CLEAR x_fieldcat.
x_fieldcat-fieldname = 'FLAG'.
x_fieldcat-seltext_l = 'Text' .
<b> x_fieldcat-outputlen = 30.</b>
x_fieldcat-col_pos = 1.
APPEND x_fieldcat TO it_fieldcat. -
TABLE FIELD DETERMINATION PROBLEM
Hi Experts,
I have a problem described below by an example .
Suppose I enter in the Tcode 'MIRO' and give the value of the field 'Inv. recpt date' and 'Reference' and then press
'ENTER' . Now I just want to know that in which table the value of the field 'Reference' is gone and saved . I tried in a
method in which I click on the field and press 'F1' . But it is showing only the structure name 'INVFO' not th table name.
So please tell me the exact step through which I can identify the table name properly .
DEB
Edited by: DEB. ABAP on Dec 1, 2011 11:32 AM
Moderator message: FAQ, please search for previous discussions of this topic.
Edited by: Thomas Zloch on Dec 1, 2011 12:12 PMHi,
U cant find out the field using pressing F1 in this type of fields....
most of the MIRO details are in RBKP and RSEG.
Some times U can find multiple values for particular record
Suppose U got 3 entries in the field of the REFERENCE from the table. To find out which is the reference u have to make help of other field. This field is almost called CONDITION TYPE.
These things are depends on clients.... So we cant give a proper answer....
Eg: REFERENCE CONDTION
123 A
124 B
125 C
here 3 values are there in ref for one doc so we have to refer condition also.....
Values : 123,124,125
condition : A, B, C
Edited by: Riyas.a.rasak on Dec 1, 2011 12:02 PM
Edited by: Riyas.a.rasak on Dec 1, 2011 12:05 PM -
Hi Mentors,
I am creating a z report in that one perticular field i want new value, old value details.
Field is in MMR - Foreigh trade import - CAS numner (pharma) this field we are using for material status.( ex. A,B,C)
Table Name - MARA Fiels name - CASNR
This status we will change every three months. so when i am taking the report i need old value and new value status.
For new value i will get from MARA-CASNR But, where i will find the old value table.
Ex. if i edit master record MM02 and go to top - environment-dispay changes- in that i am finding the chage details, if i choose the details option i am getting old value and new value details.
pls help me any one to find the old value details.
Highly appreciated any solution
award points if use ful answer
Regards
LaxmanHi Laxman,
I have found one program Please check the same.
*& Report ZAK_MM_CHANGE_HISTORY *
REPORT ZAK_MM_CHANGE_HISTORY .
TABLES:
CDHDR, CDPOS, MARA, MAKT, MARD.
FIELD-GROUPS: HEADER.
DATA: BEGIN OF CHGDOC OCCURS 50.
INCLUDE STRUCTURE CDRED.
DATA: END OF CHGDOC.
DATA:
CHGTYPE(1),
PLANT(4),
MATNR1 LIKE CHGDOC-OBJECTID.
SELECT-OPTIONS:
XMATNR FOR CDHDR-OBJECTID, "Material
XUDATE FOR CDHDR-UDATE, "Change Date
XUNAME FOR CDHDR-USERNAME, "User Name
XTCODE FOR CDHDR-TCODE, "Transaction Code
XWERKS FOR MARD-WERKS. "Plants
SELECTION-SCREEN SKIP.
*Filter change type
SELECTION-SCREEN BEGIN OF BLOCK CHG0 WITH FRAME TITLE TEXT-001.
PARAMETERS : XCHG1 AS CHECKBOX DEFAULT 'X',
XCHG2 AS CHECKBOX DEFAULT 'X',
XCHG3 AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK CHG0.
START-OF-SELECTION.
INSERT:
CHGDOC-OBJECTID "Material
CHGTYPE "Change type
PLANT
CHGDOC-CHANGENR
CHGDOC-USERNAME
CHGDOC-UDATE
CHGDOC-TCODE
CHGDOC-TABNAME
CHGDOC-TABKEY
CHGDOC-CHNGIND
CHGDOC-FNAME
CHGDOC-FTEXT
CHGDOC-TEXTART
CHGDOC-OUTLEN
CHGDOC-F_OLD
CHGDOC-F_NEW
INTO HEADER.
SELECT * FROM MARA WHERE MATNR IN XMATNR.
MATNR1 = MARA-MATNR.
CALL FUNCTION 'CHANGEDOCUMENT_READ'
EXPORTING
ARCHIVE_HANDLE = 0
CHANGENUMBER = ' '
DATE_OF_CHANGE = '00000000'
OBJECTCLASS = 'MATERIAL'
OBJECTID = MATNR1
TABLEKEY = ' '
TABLENAME = ' '
TIME_OF_CHANGE = '000000'
USERNAME = ' '
LOCAL_TIME = ' '
TABLES
EDITPOS = CHGDOC
EXCEPTIONS
NO_POSITION_FOUND = 1
WRONG_ACCESS_TO_ARCHIVE = 2
TIME_ZONE_CONVERSION_ERROR = 3
OTHERS = 4.
LOOP AT CHGDOC.
CHECK: CHGDOC-UDATE IN XUDATE,
CHGDOC-USERNAME IN XUNAME,
CHGDOC-TCODE IN XTCODE.
Chg type: 1. Part revision, 2. Price change, 3. Others
CASE CHGDOC-TCODE.
WHEN 'MM01' OR 'MM02' OR 'MM03'. CHGTYPE = '1'.
WHEN 'MR21'. CHGTYPE = '2'.
WHEN OTHERS. CHGTYPE = '3'.
ENDCASE.
Filter chg type
IF ( CHGTYPE = '1' AND XCHG1 <> 'X' ) OR
( CHGTYPE = '2' AND XCHG2 <> 'X' ) OR
( CHGTYPE = '3' AND XCHG3 <> 'X' ).
CONTINUE.
ENDIF.
Plant is a substring of tabkey
PLANT = CHGDOC-TABKEY+21(4).
IF NOT ( XWERKS IS INITIAL ) AND NOT ( PLANT IS INITIAL ).
CHECK PLANT IN XWERKS.
ENDIF.
EXTRACT HEADER.
ENDLOOP.
ENDSELECT.
END-OF-SELECTION.
SORT.
LOOP.
Material
AT NEW CHGDOC-OBJECTID.
SELECT SINGLE * FROM MAKT WHERE MATNR = CHGDOC-OBJECTID.
FORMAT INTENSIFIED ON.
SKIP. SKIP.
WRITE:/' *** Material:', (18) CHGDOC-OBJECTID, MAKT-MAKTX.
ENDAT.
Change type
AT NEW CHGTYPE.
FORMAT INTENSIFIED ON.
SKIP.
CASE CHGTYPE.
WHEN '1'. WRITE:/ ' ** Change type: PARTS REVISION'.
WHEN '2'. WRITE:/ ' ** Change type: PRICE CHANGE'.
WHEN '3'. WRITE:/ ' ** Change type: OTHERS'.
ENDCASE.
SKIP.
ENDAT.
SHIFT CHGDOC-F_OLD LEFT DELETING LEADING SPACE.
SHIFT CHGDOC-F_NEW LEFT DELETING LEADING SPACE.
FORMAT INTENSIFIED OFF.
WRITE:
/ PLANT UNDER 'Plant',
(50) CHGDOC-FTEXT UNDER 'Field',
(45) CHGDOC-F_OLD UNDER 'Old value',
(45) CHGDOC-F_NEW UNDER 'New value'.
AT NEW CHGDOC-CHANGENR.
FORMAT INTENSIFIED OFF.
WRITE:
CHGDOC-CHANGENR UNDER 'Change doc',
CHGDOC-TCODE UNDER 'Tcod',
CHGDOC-USERNAME UNDER 'User name ',
CHGDOC-UDATE UNDER 'Date ' DD/MM/YY.
ENDAT.
AT END OF CHGDOC-OBJECTID.
SKIP.
ULINE.
SKIP.
ENDAT.
ENDLOOP.
TOP-OF-PAGE.
WRITE: / SY-DATUM, SY-UZEIT,
50 'ABC PTE LTD',
100 'page', SY-PAGNO,
/ SY-REPID,
48 'Change Documents Report',
100 SY-UNAME.
SKIP.
ULINE.
WRITE:/3
'Change doc',
'Tcod',
'User name ',
'Date ',
'Plant',
(50) 'Field',
(45) 'Old value',
(45) 'New value'.
ULINE.
Go to SE38 Create one Z report and paste the program without disturbing anything and execute. If it doesnot show any values in this report use Leading zeros formulae ieGive material no like 000000000000100222 etc. Try this i have tried in my system and its working.
Reg,
Ashok
Assign points if useful. -
How can i increase table field length?
Hi all!
Little URGENT!
I am stuck up at one point. I have dmbtr currency field which has 13 length. Now i would like to increse the length of it as per client's requirement.
Can anyone guide me to do that?
Thanks in advance.Hi Prasad,
DMBTR is standard SAP field having fixed length.If you want to increase the length, you need togo to data element and domain and change there, but it asks accesskey becasue its standard field. Thats is not advisable.
regards
Chandra.
Note: Please reward if helpful. -
PLSQL script not collecting temp table fields - variables problem?
I've 'written' a script to extract data from a temp table and load it directly into the associated Oracle tables via HRMS's
API packages.. but when I put the DBMS_OUTPUT.PUT_LINE's in I see that although it seems to read first API OK it doesn't collect the information from their relevant fields in the temp table.. Can anyone help please please..?
======================== code ==========================
SET serveroutput ON SIZE 1000000
SET verify OFF
SET feedback OFF
DECLARE
-- Debugging/error handling
v_err_seq NUMBER := 0;
v_err_num VARCHAR2 (30);
v_err_msg VARCHAR2 (250);
v_err_line VARCHAR2 (350);
-- Work variables
p_hire_date DATE;
p_business_group_id NUMBER := 0;
p_person_id NUMBER := 0;
p_address_line1 VARCHAR2 (240);
p_date_of_birth VARCHAR2 (35);
p_address_line2 VARCHAR2 (240);
employee_number VARCHAR2 (14);
p_employee_number VARCHAR2 (14);
emp_number VARCHAR2 (14);
p_email_address VARCHAR2 (240);
p_address_line3 VARCHAR2 (240);
p_first_name VARCHAR2 (150);
p_address_line4 VARCHAR2 (240);
p_middle_names VARCHAR2 (30);
p_post_code VARCHAR2 (30);
p_last_name VARCHAR2 (150);
p_nationality VARCHAR2 (30);
p_sex VARCHAR2 (30);
p_national_identifier VARCHAR2 (30);
p_title VARCHAR2 (30);
v_rec_cnt NUMBER := 0;
insert_flag VARCHAR2 (8);
-- ip_p_address_id NUMBER;
ip_p_address_id per_addresses.address_id%TYPE;
ip_p_object_version_number NUMBER;
ip_p_party_id per_addresses.party_id%TYPE;
l_person_id per_all_people_f.person_id%TYPE;
l_employee_number VARCHAR2 (35);
l_validate BOOLEAN DEFAULT FALSE;
l_assignment_id NUMBER;
l_per_object_version_number NUMBER;
l_asg_object_version_number NUMBER;
l_per_effective_start_date DATE;
l_per_effective_end_date DATE;
l_full_name VARCHAR2 (240);
l_per_comment_id NUMBER;
l_assignment_sequence NUMBER;
l_assignment_number VARCHAR2 (100);
l_name_combination_warning BOOLEAN;
l_assign_payroll_warning BOOLEAN;
l_address_id NUMBER;
l_object_version_number NUMBER;
return_code NUMBER;
return_message VARCHAR2 (2000);
command_prin VARCHAR2 (4000);
-- Get employee details info from work table
CURSOR get_employee_details
IS
SELECT p_person_id, p_validate, p_hire_date, p_business_group_id,
p_last_name, p_sex, p_date_of_birth, p_email_address,
p_employee_number, p_first_name, p_marital_status,
p_middle_names, p_nationality, p_title, p_national_identifier,
p_address_line1, p_address_line2, p_address_line3,
p_address_line4, p_post_code
FROM SU_TEMPLOYEE_DETAILS;
-- checks employee details info from PER_ALL_PEOPLE_F table
-- v_err_seq := 1;
CURSOR c_check_employee (emp_number VARCHAR2)
IS
SELECT per.person_id, per.business_group_id, per.last_name,
per.start_date, per.date_of_birth, per.email_address,
per.employee_number, per.first_name, per.marital_status,
per.middle_names, per.nationality, per.national_identifier,
per.sex, per.title, padd.address_id, padd.primary_flag,
padd.address_line1, padd.address_line2, padd.address_line3,
padd.town_or_city, padd.postal_code, padd.telephone_number_1,
padd.object_version_number
FROM per_all_people_f per, per_addresses padd
WHERE per.employee_number = emp_number
AND per.person_id = padd.person_id;
emp_rec c_check_employee%ROWTYPE;
BEGIN
--v_err_seq := 2;
command_prin := SQLERRM;
LOOP
-- Process each record in the work table
FOR v_emp IN get_employee_details
LOOP
v_rec_cnt := v_rec_cnt + 1;
-- determine whether customer already exists
OPEN c_check_employee (v_emp.p_employee_number);
FETCH c_check_employee
INTO emp_rec;
IF c_check_employee%NOTFOUND
THEN
insert_flag := 'I';
ELSE
insert_flag := 'X';
END IF;
IF insert_flag = 'I'
THEN
-- RETURN 'Employee does not exist, continue import..';
DBMS_OUTPUT.PUT_LINE ('Employee does not exist, continue import..');
ELSE
DBMS_OUTPUT.PUT_LINE ('Employee found - record cannot be imported.');
END IF;
CLOSE c_check_employee;
-- v_err_seq := 3;
-- Create new PER_ALL_PEOPLE_F and PER_ADDRESSES record from
-- info in table record
IF insert_flag = 'I'
THEN
BEGIN -- Importing Employee Procedure --
DBMS_OUTPUT.PUT_LINE (' ');
DBMS_OUTPUT.PUT_LINE ('Importing employees....Hold On.......! ');
DBMS_OUTPUT.PUT_LINE (' ');
BEGIN
Hr_Employee_Api.create_gb_employee
(p_validate => l_validate, --FALSE,
p_hire_date => p_hire_date,
p_business_group_id => p_business_group_id,
p_date_of_birth => p_date_of_birth,
p_email_address => p_email_address,
p_first_name => p_first_name,
p_middle_names => p_middle_names,
p_last_name => p_last_name,
p_sex => p_sex,
p_ni_number => p_national_identifier,
p_employee_number => l_employee_number,
p_person_id => l_person_id,
p_title => p_title,
p_assignment_id => l_assignment_id,
p_per_object_version_number => l_per_object_version_number,
p_asg_object_version_number => l_asg_object_version_number,
p_per_effective_start_date => l_per_effective_start_date,
p_per_effective_end_date => l_per_effective_end_date,
p_full_name => l_full_name,
p_per_comment_id => l_per_comment_id,
p_assignment_sequence => l_assignment_sequence,
p_assignment_number => l_assignment_number,
p_name_combination_warning => l_name_combination_warning,
p_assign_payroll_warning => l_assign_payroll_warning
DBMS_OUTPUT.PUT_LINE
('..employee record updated succesfully..');
DBMS_OUTPUT.PUT_LINE (' ');
DBMS_OUTPUT.PUT_LINE (' ');
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE ('..SQLCodeErrors:- ' || SQLCODE);
DBMS_OUTPUT.PUT_LINE (' ');
DBMS_OUTPUT.PUT_LINE ('Person ID:-' || p_person_id || l_person_id);
DBMS_OUTPUT.PUT_LINE ('Assignmnt Seq - '|| l_assignment_sequence);
DBMS_OUTPUT.PUT_LINE ('l_ass_no - ' ||l_assignment_number);
-- DBMS_OUTPUT.PUT_LINE ('Record failed to load.. ' || SQLERRM);
DBMS_OUTPUT.PUT_LINE (SUBSTR (command_prin, 1, 250));
END;
BEGIN -- Importing Associated Address Procedure --
DBMS_OUTPUT.PUT_LINE (' ');
-- ('..and the associated employee address....');
Hr_Person_Address_Api.create_person_address
(p_validate => l_validate,
-- p_effective_date => p_hire_date,
p_effective_date => SYSDATE,
p_pradd_ovlapval_override => NULL,
p_validate_county => NULL,
p_person_id => l_person_id,
p_primary_flag => 'Y',
p_style => 'GB_GLB',
-- p_date_from => p_hire_date,
p_date_from => SYSDATE,
p_date_to => NULL,
p_address_type => NULL,
p_comments => NULL,
p_address_line1 => p_address_line1,
p_address_line2 => p_address_line2,
p_address_line3 => p_address_line3,
p_town_or_city => p_address_line4,
p_region_1 => NULL,
p_region_2 => NULL,
p_region_3 => NULL,
p_postal_code => p_post_code,
p_country => p_nationality,
p_telephone_number_1 => NULL,
p_telephone_number_2 => NULL,
p_telephone_number_3 => NULL,
p_addr_attribute_category => NULL,
p_addr_attribute1 => NULL,
p_addr_attribute2 => NULL,
p_addr_attribute3 => NULL,
p_addr_attribute4 => NULL,
p_addr_attribute5 => NULL,
p_addr_attribute6 => NULL,
p_addr_attribute7 => NULL,
p_addr_attribute8 => NULL,
p_addr_attribute9 => NULL,
p_addr_attribute10 => NULL,
p_addr_attribute11 => NULL,
p_addr_attribute12 => NULL,
p_addr_attribute13 => NULL,
p_addr_attribute14 => NULL,
p_addr_attribute15 => NULL,
p_addr_attribute16 => NULL,
p_addr_attribute17 => NULL,
p_addr_attribute18 => NULL,
p_addr_attribute19 => NULL,
p_addr_attribute20 => NULL,
p_add_information13 => NULL,
p_add_information14 => NULL,
p_add_information15 => NULL,
p_add_information16 => NULL,
p_add_information17 => NULL,
p_add_information18 => NULL,
p_add_information19 => NULL,
p_add_information20 => NULL,
-- p_party_id => NULL,
p_party_id => ip_p_party_id,
p_address_id => ip_p_address_id,
p_object_version_number => ip_p_object_version_number
DBMS_OUTPUT.PUT_LINE ('Address Updation/Insertion has been successful!');
EXIT WHEN command_prin IS NULL;
command_prin := SUBSTR (command_prin, 251);
END;
END;
-- v_err_seq := 4;
-- End of customer related details
END IF;
END LOOP;
-- DBMS_OUTPUT.PUT_LINE ('Records read : ' || v_rec_cnt);
-- v_err_seq := 5;
--EXCEPTION
-- WHEN OTHERS THEN
-- ROLLBACK;
-- Output Error Message
-- v_err_num := TO_CHAR(SQLCODE);
-- v_err_msg := SUBSTR(SQLERRM,1,250);
-- v_err_line := 'Oracle error (seqno=' || v_err_seq || ') ' ||
-- v_err_num ||' occurred processing record '||
-- TO_CHAR(v_rec_cnt + 1) ||' : '||v_err_msg;
-- DBMS_OUTPUT.PUT_LINE(v_err_line);
END LOOP;
COMMIT;
END;
--END;
EXIT;
======================================================
many thanks to all...
StevenIve just sussed it - I had'nt put the 'v_emp' at the front of the fields from the temp table to pick then up! we continue..
-
Internal table field name problem
Dear All,
I am declaring one internal table & fetching data using inner join. Following is my structure of internal table but it is not fetching data into MATNR1, the data is there in the table.
Kindly suggest why this is happening?
Regards,
Dilip Gupchup
internal table
data : begin of sales_to_purchase_link_itab occurs 10,
*******FOR P O RELATED INFORMATION
EBELN LIKE EKKN-EBELN,"DOCUMENT NO
AEDAT LIKE EKPO-AEDAT,"P O DATE
EBELP LIKE EKKN-EBELP," ITEM
MATNR LIKE EKPO-MATNR,"MATERIAL
MENGE LIKE EKKN-MENGE,"QUANTITY
SAKTO LIKE EKKN-SAKTO,"G/L Account Number
NETWR LIKE EKKN-NETWR,"Net order value in PO
*******END FOR P O RELATED INFORMATION
*******FOR SALES ORDER RELATED INFORMATION
VBELN LIKE EKKN-VBELN,"SALES DOC NO
VBELP LIKE EKKN-VBELP,"SALES DOC ITEM
MATNR1 LIKE VBAP-MATNR,"SALES MATERIAL
ERDAT LIKE VBAP-ERDAT,"SALES DOC DATE
ARKTX LIKE VBAP-ARKTX,"MATERIAL DESCRIPTION
ZMENG LIKE VBAP-ZMENG,"QUANTITY
NETPR LIKE VBAP-NETPR,"SALE VALUE
*******FOR SALES ORDER RELATED INFORMATION
end of sales_to_purchase_link_itab.
select query
select
ekkn~ebeln
EKKN~EBELP
EKKN~SAKTO
EKKO~AEDAT
ekko~bukrs
EKPO~MATNR
EKPO~MENGE
EKPO~NETWR
vbap~vbeln
ekkn~vbelp
vbap~arktx
VBAP~MATNR
into corresponding fields of table
sales_to_purchase_link_itab from ekkn
inner join ekko on ekknebeln eq ekkoebeln "UP TO 10 ROWS.
INNER JOIN EKPO ON EKKOEBELN EQ EKPOEBELN
inner join vbap on ekknvbeln eq vbapvbeln
WHERE
EKPO~AEDAT IN S_ERDAT1.Hi,
or change your coding like that:
DATA rep LIKE sy-repid.
TYPE-POOLS : slis.
DATA : fcat TYPE slis_t_fieldcat_alv.
DATA wa TYPE slis_fieldcat_alv.
DATA : BEGIN OF fld OCCURS 0,
name(50),
END OF fld.
rep = sy-repid.
*only possible if fields of itab are defined with LIKE !
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = rep
i_internal_tabname = 'SALES_TO_PURCHASE_LINK_ITAB'
i_client_never_display = 'X'
i_inclname = rep
CHANGING
ct_fieldcat = fcat.
LOOP AT fcat INTO wa.
CONCATENATE wa-ref_tabname '~' wa-fieldname INTO fld-name.
APPEND fld.
ENDLOOP.
SELECT (fld)
INTO TABLE sales_to_purchase_link_itab
FROM ekkn
INNER JOIN ekko ON ekkn~ebeln EQ ekko~ebeln "UP TO 10 ROWS.
INNER JOIN ekpo ON ekko~ebeln EQ ekpo~ebeln
INNER JOIN vbap ON ekkn~vbeln EQ vbap~vbeln
WHERE
ekpo~aedat IN s_erdat1.
Andreas -
Problem with table name lengths.
Has anyone experienced with table name length problem?
When tables are created with schema registration, and the name is longer than 14 characters, the table is created. But when I "select * from xxxx_xxxx_xxxx_xxxx" it says that the table doesn't exist.
What's the max length of a table name? Or is this a problem with XDB?
Thanks,
BenjaminFound the problem.
All table names must be all capitalized and seperated with underscore.
Is there something I need to set in oracle? or is this a bug? The tables are created but can't be accessed because of the case of table name... that doesn't make sense. -
ALV output problem in displaying the field lengths.( LONG_DES1 & LONG DES)
I have declared itab of ALV output like below...
Internal table for ALV report generation***********
DATA : Begin of pdet_otab_alv occurs 0,
bukrs LIKE bsid-bukrs, "Company code
postm(4), "Posting month (YYMM format)
xblnr LIKE bsid-xblnr, "Reference document number
kunnr LIKE bsid-kunnr, "Customer (Supplier Billing Customer)
name1 LIKE kna1-name1, "Name 1
buzei like bsid-buzei,
gjahr like bsid-gjahr,
filkd like bsid-filkd, "Rep Number
rname like kna1-name1, "Rep Name
belnr LIKE bsid-belnr, "Document number (invoice number)
blart LIKE bsid-blart, "Document type
zfbdt LIKE bsid-zfbdt, "Baseline date
zterm LIKE knb1-zterm, "Terms
netdt LIKE bsega-netdt,"Due date
sgtxt LIKE bsid-sgtxt, "Text
agerg TYPE t_agerg, "Age range of invoice
wrbtr LIKE bsid-wrbtr, "Original invoice amount
due LIKE bsid-wrbtr, "Amount outstanding on invoice
long_des(250) type c, " Long description
<b> long_des TYPE string,
long_des1 TYPE string,</b>
date_s(10) type c, " Date
short_des(20) type c, " Short Description
counter type i,
End of pdet_otab_alv.
And after filling the internal table fields ( fields 'LONG_DES1' & 'LONG_DES' from FM READ_TEXT 's longtext, which are of 265 chars each )
<b>'LONG_DES1' & 'LONG_DES' are trimmed in ALV out put WHY ?</b>
w_fieldcat-fieldname = 'LONG_DES1'.
w_fieldcat-tabname = 'PDEL_OTAB_ALV'.
w_fieldcat-ref_fieldname = 'SCRTEXT_L'.
w_fieldcat-ref_tabname = 'DD03P'.
w_fieldcat-seltext_l = 'Original Note'.
w_fieldcat-col_pos = 17.
APPEND w_fieldcat TO fieldcat.
CLEAR w_fieldcat.
w_fieldcat-fieldname = 'LONG_DES'.
w_fieldcat-tabname = 'PDEL_OTAB_ALV'.
w_fieldcat-ref_fieldname = 'SCRTEXT_L'.
w_fieldcat-ref_tabname = 'DD03P'.
w_fieldcat-seltext_l = 'Latest Note'.
w_fieldcat-col_pos = 18.
APPEND w_fieldcat TO fieldcat.
CLEAR w_fieldcat.
<b>next part i.e., before passing fieldcat.... I have filled s_layout like below.</b>
<b> s_layout-max_linesize = 1000.
s_layout-colwidth_optimize = 'X'.</b>
Call the following function to display output in ALV form
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZFRSBOI0'
is_layout = s_layout
it_fieldcat = fieldcat
it_events = p_events[]
it_sort = p_it_sort[]
i_save = 'A'
TABLES
t_outtab = pdet_otab_alv1
EXCEPTIONS
program_error = 1
OTHERS = 2.
If the function call is not successful, raise error message
and come out from the program
IF sy-subrc <> 0.
message e000(00) with
'Unable to display report'(e01).
exit.
ENDIF.some body suggested me....we can display full length of text by below coding ?
Is that not correct - just asking....
s_layout-max_linesize = 1000.
s_layout-colwidth_optimize = 'X'.
Call the following function to display output in ALV form
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = 'ZFRSBOI0'
is_layout = s_layout
it_fieldcat = fieldcat
it_events = p_events[]
it_sort = p_it_sort[]
i_save = 'A'
TABLES
t_outtab = pdet_otab_alv1
EXCEPTIONS
program_error = 1
OTHERS = 2.
If the function call is not successful, raise error message
and come out from the program
IF sy-subrc <> 0.
message e000(00) with
'Unable to display report'(e01).
exit.
ENDIF. -
Changing field length of a standard field in standard table VBEP
Hi,
Please advice the possibility and the possible repercussions of changing field lengths in a standard table. Table in concern is VBEP.
Thanks & Rgds,
PradeepNo you cannot change the field length
thanks
G. Lakshmipathi -
What is the best way to declare field length 500 in internal table?
Hi all,
what is the best way to declare field length 500(constant value allways) in internal table?
I am trying to send data from internal table to file format, and I have a field in internal table with 500 length (constant value always). So how do I can declare and append this field value to table?
Thanks
MuraliHi. Please see the following example program, notice how I am filling the field with the constant value.
report zrich_0001.
* CLASS lcl_main DEFINITION
class lcl_main definition.
public section.
types: begin of ttab,
fld1(500) type c,
end of ttab.
data: itab type table of ttab.
data: xtab type ttab.
methods: constructor,
write_itab.
endclass.
* CLASS lcl_main IMPLEMENTATION
class lcl_main implementation.
method constructor.
<b>
xtab-fld1 =
'This is one part of the total string which needs to be really' &
' long and this is a constant and we need to move it to a work' &
' area and then append it to the internal table which has a' &
' field with a length of five hundred characters'.
append xtab to itab.</b>
endmethod.
method write_itab.
loop at itab into xtab.
write:/ xtab-fld1.
endloop.
endmethod.
endclass.
data: o_main type ref to lcl_main.
start-of-selection.
create object o_main.
call method o_main->write_itab.
Regards,
Rich Heilman -
Field length in internal table
hi,
how to selt field length in internal table?.
i have created on report the report out puts down load to using download function .
the out format is:
op1 op2 op3 op4
1 3 4
i want
op1 op2 op3 op4
1 3 4
how to set this please give sample code.HI,
Give internal table like this.
DATA: BEGIN OF itab OCCURS 100,
op1(04),
op2(04),
op3(04),
op4(04),
END OF itab.
So it will allocate space between 1, 3 and 4.
Reward if it useful.
Thanks. -
I am trying to extend the field length for colun lei_information 3 from 16 characters to 30 characters in the table hr_location_extra_info_lei, but cannot seem to do this. Can the length be changed and if so how?
Many thanks
LouiseHi Louise,
All the "lei_informationX" columns in hr_location_extra_info table are of size VARCHAR2(150) (Oracle EBS R12).
So I understand why you're saying it's limited to 16 characters.
May it's only a question of your setup limiting it to 16 car., in which case you can easily change it to 30 by unfreezing the DFF and modifying it.
Regards,
Rajen -
Problem with fetching table field
Hi all, im explaining the problem, please provide me the query.
i am having the follong tables
1)location table contains one PK(loc_id)and authorization field, etc.
2)accont table contain one FK(loc_id) and hrid , attuid fields etc
3)LINE table contains INTERLATA_PIC_FREEZE & INTRALATA_PIC_FREEZE and some more fields.
4)TRUNK table contains INTERLATA_PIC_FREEZE & INTRALATA_PIC_FREEZE and some more fields.
5)NODAL_TSG table contains INTERLATA_PIC_FREEZE & INTRALATA_PIC_FREEZE and some more fields.
6)REMOTE_CALL_FWD table contains INTERLATA_PIC_FREEZE & INTRALATA_PIC_FREEZE and some more fields.
7)Order2misc table contains FK(SER_LOC_ID) of Location table
PIC means INTERLATA_PIC_FREEZE/INTRALATA_PIC_FREEZE
PLOC means INTERLATA_PIC_FREEZE/INTRALATA_PIC_FREEZE
i need to send an authorization field value to another interface.
condition
===========
if(LOCATION.AUTHORIZATION using Account.loc_id is not null and LINE.INTERLATA_PIC_FREEZE not equal to 'F' and LINE.INTRALATA_PIC_FREEZE not equal to 'F' and similaraly for TRUNK, NODAL_TSG and REMOTE_CALL_FWD table fields)
else
fetch the authorization field from
LOCATION.AUTHORIZATION using Order2misc.ser_loc_id
=======
please provide me the query.
thanks in advanceHI thanks for ur reply
i tried lmy best.
im able to put that into 2 queries, but i need to join both of them in single query
query-1
======
Select l.authorization
from location l JOIN ACCOUNT a on a.loc_id = l.loc_id
and l.authorization is not null
where not exists
select * from Line where INTERLATA_PIC_FREEZE = 'F' or INTRALATA_PIC_FREEZE = 'F'
union all
select * from trunk where INTERLATA_PIC_FREEZE = 'F' or INTRALATA_PIC_FREEZE = 'F'
union all
select * from NODAL_TSG where INTERLATA_PIC_FREEZE = 'F' or INTRALATA_PIC_FREEZE = 'F'
union all
select * from REMOTE_CALL_FWD where INTERLATA_PIC_FREEZE = 'F' or INTRALATA_PIC_FREEZE = 'F'
query--2
=======
Select l.authorization
from location l JOIN order2misc o on o.ser_loc_id = l.loc_id
and l.authorization is null
where exists
select * from Line where INTERLATA_PIC_FREEZE = 'F' or INTRALATA_PIC_FREEZE = 'F'
union all
select * from trunk where INTERLATA_PIC_FREEZE = 'F' or INTRALATA_PIC_FREEZE = 'F'
union all
select * from NODAL_TSG where INTERLATA_PIC_FREEZE = 'F' or INTRALATA_PIC_FREEZE = 'F'
union all
select * from REMOTE_CALL_FWD where INTERLATA_PIC_FREEZE = 'F' or INTRALATA_PIC_FREEZE = 'F'
================
i need a single query. and correct me if the above query's are wrong -
How to read table fields form a table having length of 7 characters
HI all,
could you please tell me how to read table fields from a table having length 7 characters, i have requirement that in my ztable i have 30 fields out of which 20 fields are location fields, i want to select 20 fields which have 7 characters length.
please could any body suggest me on this issue.
thanks,
sre.hi,
try like this
create a data variable of type i as
data: len type i.
create internal table for 20 fields as
data:begin of itab,
fld 1 type .......
end of itab.
data:itab type itab1 occurs 0 with header line.
loop at itab2. // original internal table which all fields.
read table itab2 with index sy-tabix.
len = strlen (itab2-fld).
if len eq 7.
move itab2 itab1.
append itab1.
endif.
endloop.
if helpful reward some points.
with regards,
Suresh.A
Maybe you are looking for
-
Java.lang.NoSuchMethodError while invoking web service method
Hi, I have a web service which has two methods exposed as A and B. I deployed it on weblogic server (7.0 SP4) and fired teh request when I got this error: <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schem
-
Hello! I'm using Bridge CS4 for image research projects. This is all fine and good for inputting info. However, others on the project don't have time to launch photoshop to look at every bit of metadata I'm inputting. They like print outs. Is there A
-
J/v passed for TDS which not shown TDS Report
Sir,, I faced problem regarding some TDS Like Interest,Salary, entry passed through which not shown in Tds report. I not aware about how to passed this type entry so which appeared in TDS report. Pls give me a suggestion regarding above problem.
-
What is the maximum size of hard drive that a Net Book NB-255 can use ?
-
ORA-01157 and ORA-01110 errors
Dear all, I was getting "ORA-00205: error in identifying controlfile" error while starting the database This had happened during the investigation of the IMPORT_ABAP phase failure, during our system copy (Import) I found out in alert_SID.log that co