‎2010 Dec 27 6:49 AM
Hi i have a problem with table entries. I have one table with name 'z*' having fields of vbeln ,date, plant.
when i try to display the records it displays all the vbeln records. In that some of them are having vbeln with preceding
zeros like 0009050750 and some are not having zeros like 9081059. When i try to display 0009050750 it executes and display
that record but when i try to display 9081059 it doesnot execute and it displays "no table entries found for specific key".
Plz give any suggesions on that.
Plz solve my issue
Shiva.
‎2010 Dec 27 10:42 AM
Hi,
Try to search with LIKE statement instead of = .
Ex.
Select * from ztable into ita where vbeln like '9090810'.
‎2010 Dec 27 8:13 AM
Hi Shiva,
are you using standard domain ?
e.g domain for VBELN is VBELN . In definition tab there ALPHA is maintained in Convers. Routine. This converts internally values with actual length.
e.g 0000000098 can be actly found by passing 98.
Please pass this ALPHA conversion routine in your domain.
Thanks,
Rupali
‎2010 Dec 27 9:11 AM
THANKS but i am using domain of vbeln only but since i did not get any output
‎2010 Dec 27 8:40 AM
Hello Shivang,
Can you look at the function given below:
CONVERSION_EXIT_ALPHA_INPUT
CONVERSION_EXIT_ALPHA_OUTPUT
above function you can use in your problem.
Regards,
Sujeet
‎2010 Dec 27 9:18 AM
Thanks for ur reply but in table only it doesnot display... It iss at table level I can't get output when i try to display without preceding zeros even data is present for that particular vbeln
‎2010 Dec 27 9:28 AM
Hi,
Try this out:
Goto SE14 -> Enter your table name -> choose Edit -> Active and Adjust database.
But I think we should erase database contains before check the alpha conversion routine.
Hope it help.
Thanks,
Thien
‎2010 Dec 27 9:32 AM
Hello Shivang,
Yes, you are right..at the table level its with all leading zeros.
you can do one thing, the local variables in which you are passing the value of VBELN, make that to type VBELN_VA.
Hope it solve your problem.
Regards,
Sujeet
‎2010 Dec 27 10:33 AM
No sujeet it is having the converstion routine as same as vbeln_vf.
‎2010 Dec 27 9:39 AM
HI,
Change the code in your custom report from where the Z* is getting populated.
Use conversion routines before updating the table.
Regards
Praveen
‎2010 Dec 27 10:30 AM
thanks praveen reddy
actually here data is present for vbeln in both with zeros and without zeros. But if i try to execute with zeros the data fetched from table but when i try to execute the table without zero vbeln values the data is not fetching. But data is present in table.
‎2010 Dec 27 9:46 AM
Hi Shiva,
go to se16n and enter table name and execute ..
double click on the record row and see the Uncoverted record and converted record.
If they tried to save the record in some time with uncoverted format.
so go to se11-->enter ztable and chcek where used list.
and check while updating the table are they usign the converted format ..
if they try to assign the data will be in unconverted.
instead of assign try to use move command at vbeln field the data will be in converted formated and then insert.
then the table data in proper format.
Prabhudas
‎2010 Dec 28 3:49 AM
can u tell me the way how to convert the table data to normal data...
Plz
‎2010 Dec 28 6:18 AM
As you created a Z table, just change your domain as VBELN_VA for VBELN, adjust the data base in SE14, then it will work.
‎2010 Dec 28 6:46 PM
So this is the root of your ABAP thread regarding S_VBELN and Z-table.
Anyway, if you care to follow my advice: go to SE11 find the menu option database utilities and choose: adjust database with the option to keep your old data.
If your Z-table-VBELN is set up properly i hope the system will take all the entries without leading zeroes and store them with leading zeroes.
‎2010 Dec 27 10:42 AM
Hi,
Try to search with LIKE statement instead of = .
Ex.
Select * from ztable into ita where vbeln like '9090810'.
‎2010 Dec 27 12:28 PM
‎2010 Dec 27 1:26 PM
Hi,
Then put ' *9090810' in the selection field. You can find the records.
‎2010 Dec 28 4:30 AM
‎2010 Dec 28 5:52 AM
Hi anjun i solved on table level with your reply but i have another problem with report how can i get output in the select statement of report....
I have select-options with vbeln so how can i use '*9782546' here.
So i need to append * to s_vbeln value plz give me the code to solve my issue...
Thanks
Siva
‎2010 Dec 28 6:10 AM
hi ,
you can use the same code with vbeln = *99080.. it wil work
SELECT-OPTIONS : s_vbeln FOR vbrk-vbeln OBLIGATORY.
SELECT vbeln
fkart
fktyp
vbtyp
waerk FROM vbrk INTO CORRESPONDING FIELDS OF TABLE it_tab WHERE vbeln IN s_vbeln.
‎2010 Dec 28 9:13 AM
Hi,
w_vbeln value you take is '*9782546.
Then write the code.
shift w_vbeln .
select * from ztable where vbeln like w_vbeln.
‎2010 Dec 28 9:48 AM
Yes you are correct but i used it in select-option so i have to give two values. % is going to append at the last of all the values which are in between these two values i.e.., 9081040% and 9081040%.
Please give any suggestions.
‎2010 Dec 28 9:52 AM
Hi deepikav
here i gave two values for select-options in selection-screen. If i enter 9081040% and 9081080% report is executing. But when i try to give 9081040 and 9081080 report is not executing. Please share the code which i need it will helpfull for me
‎2010 Dec 28 11:15 AM
TABLES : vbrk.
TYPES : BEGIN OF it_t1,
vbeln TYPE vbrk-vbeln,
fkart TYPE vbrk-fkart,
fktyp TYPE vbrk-fktyp,
vbtyp TYPE vbrk-vbtyp,
waerk TYPE vbrk-waerk,
END OF it_t1.
DATA : it_tab TYPE TABLE OF it_t1,
wa_tab TYPE it_t1.
SELECT-OPTIONS : s_vbeln FOR vbrk-vbeln OBLIGATORY.
SELECT vbeln
fkart
fktyp
vbtyp
waerk FROM vbrk INTO CORRESPONDING FIELDS OF TABLE it_tab WHERE vbeln IN s_vbeln.
LOOP at it_tab INTO wa_tab.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_tab-vbeln
IMPORTING
OUTPUT = wa_tab-vbeln
.
MODIFY it_tab FROM wa_tab INDEX sy-tabix.
CLEAR : wa_tab.
ENDLOOP.
LOOP AT it_tab INTO wa_tab.
WRITE : / wa_tab-vbeln , wa_tab-fkart , wa_tab-fktyp , wa_tab-vbtyp , wa_tab-waerk.
CLEAR : wa_tab.
ENDLOOP.
‎2010 Dec 28 6:08 AM
I got a solution at table level but i did not get solution at report level how can i do this