Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

unable to view data in se16

Former Member
0 Kudos

hi

i have created a ztable with 3 fields.and the three data elements are yktopl,saknr and zsaknr.

yktopl is a copy of ktopl

zsaknr is a copy of saknr.

i am using excel file to upload data to this table.

one the data loaded sucessfully ,

when i execute se-ztable then i am able to see all the records.

if i want view data for a perticular A/C is is saying no data found.

but if i put zfield or zfield or zfield then i am ablt to see data for zfield

if i just enter zfield then it is saying no data found.

any inputs..

15 REPLIES 15

Former Member
0 Kudos

Did you copy the conversion exits?

Rob

0 Kudos

here is the program

&----


*& Report ZWPRGL_FS_ITEM_UPLOAD *

*& *

&----


*& *

*& *

&----


REPORT ZWPRGL_FS_ITEM_UPLOAD .

TABLES: ZFSMAP.

DATA: t_ZFSMAP TYPE TABLE OF ZFSMAP.

SELECTION-SCREEN BEGIN OF BLOCK a1 WITH frame title text-001.

PARAMETERS: r_read radiobutton group gr1,

p_file TYPE rlgrap-filename,

p_endrow TYPE I DEFAULT 65000,

p_modf AS CHECKBOX ,

r_del radiobutton group gr1.

SELECT-OPTIONS: s_saknr FOR ZFSMAP-zwpr_glacct.

SELECTION-SCREEN END OF BLOCK a1.

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_'

IMPORTING

FILE_NAME = p_file.

START-OF-SELECTION.

If r_read = 'X'.

IF p_file IS INITIAL.

write 'Please enter file name'.

exit.

ENDIF.

PERFORM read_file.

PERFORM update_database.

endif.

IF r_del = 'X'.

DELETE FROM ZFSMAP WHERE ZWPR_GLACCT IN s_saknr.

COMMIT WORK.

WRITE 'Successfully deleted data'.

ENDIF.

&----


*& Form READ_FILE

&----


form READ_FILE .

DATA: tl_data TYPE TABLE OF alsmex_tabline,

wal_ZFSMAP TYPE ZFSMAP.

FIELD-SYMBOLS: <l_data> TYPE alsmex_tabline.

CLEAR t_ZFSMAP.

REFRESH t_ZFSMAP.

IF p_endrow IS INITIAL.

p_endrow = 65000.

ENDIF.

CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

EXPORTING

filename = p_file

i_begin_col = 1

i_begin_row = 1

i_end_col = 3

i_end_row = p_endrow

TABLES

intern = tl_data

EXCEPTIONS

inconsistent_parameters = 1

upload_ole = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

LOOP AT tl_data ASSIGNING <l_data>.

  • IF sy-tabix > X

CASE <l_data>-col.

WHEN 1.

wal_ZFSMAP-ZWPR_CHARACCT = <l_data>-value.

WHEN 2.

wal_ZFSMAP-zwPR_GLACCT = <l_data>-value.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = <l_data>-value

IMPORTING

OUTPUT = <l_data>-value.

WHEN 3.

wal_ZFSMAP-ZFS_ITM = <l_data>-value.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = <l_data>-value

IMPORTING

OUTPUT = <l_data>-value.

APPEND wal_ZFSMAP to t_ZFSMAP.

ENDCASE.

  • ENDIF.

ENDLOOP.

endform. " READ_FILE

&----


*& Form UPDATE_DATABASE

&----


form UPDATE_DATABASE .

if t_ZFSMAP[] IS NOT INITIAL.

if p_modf IS INITIAL.

INSERT ZFSMAP FROM TABLE t_ZFSMAP.

ELSEIF p_modf IS NOT INITIAL.

MODIFY ZFSMAP FROM TABLE t_ZFSMAP.

ENDIF.

COMMIT WORK.

WRITE 'Successfully updated data'.

ENDIF.

endform.

0 Kudos

In the table, not the program.

Rob

0 Kudos

No.

can you please tell me how to do that.

0 Kudos

Did you make copies of the domains or use the original ones?

Rob

0 Kudos

i tried both options but the same result.

0 Kudos

For a start, try putting in the leading zeroes when selecting individual records.

Rob

0 Kudos

if i add 000 for the accounting doc number its working fine..

can you plz tell me what is coping conversion exits in table and how do we doi that.

thanks,

srinivas

0 Kudos

You said that you have three fields in the table. I don't see the document number there.

Rob

0 Kudos

saknr is the data element for gl account number..

sorry for the confusion

0 Kudos

And what is the domain?

Rob

0 Kudos

domain is also saknr( g/l account number.

0 Kudos

Then it should be OK (so long as you enter individual accounts or ranges). If you use '*', then you will have to add the leading zeroes.

Rob

0 Kudos

thanks for your time and suggestion..

i have used the conversion exits in the program to add leading zeros

itss wroking fine now..

points assigned.

srinivas

0 Kudos

Please close this thread (and your others as well). You may find that you cannot post new ones with so many open.

Rob