on 10-24-2007 8:51 AM
Hi guys,
i do not get the seq no for my code.,can u help me it is very urgent
i need to get description text from table hrp1002 and hrt1002 for business events in seq
urgent
table struture
Transparent table ZTRG_CA_GEN_S1 Active
Short description Training Catalog Description - General Description.
Fields KeyIniField type Data Lgth. Dec.plCheck table Short
MANDT MANDT CLNT 3 0 Client
BE_ID OTJID CHAR 10 0 C
SEQNR NUMC5 NUMC 5 0 5
TLINE HRLINE79 CHAR 79 0 Line
DATA: BEGIN OF t_general OCCURS 0.
INCLUDE STRUCTURE ztrg_ca_gen_s1.
DATA: END OF t_general.
DATA: BEGIN OF t_gen OCCURS 0,
objid LIKE hrp1002-objid,
tabnr LIKE hrp1002-tabnr.
DATA: END OF t_gen.
DATA: t_t1002 LIKE hrt1002 OCCURS 0 WITH HEADER LINE.
SELECT * FROM ztrg_ca_gen_s1 INTO TABLE t_general.
DELETE ztrg_ca_gen_s1 FROM TABLE t_general.
REFRESH: t_gen.
CLEAR: t_gen.
SELECT objid tabnr
INTO CORRESPONDING FIELDS OF TABLE t_gen FROM hrp1002
WHERE plvar EQ '01'
AND objid EQ resulttabnew-objt6+2(8)
AND subty EQ '0001'
AND ( begda >= pchobeg AND begda <= pchoend ).
LOOP AT t_gen.
REFRESH t_t1002.
SELECT * INTO TABLE t_t1002
FROM hrt1002
WHERE tabnr EQ t_gen-tabnr.
LOOP AT t_t1002.
MOVE resulttabnew-objt6 TO t_general-be_id .
move t_t1002-tline TO t_general-tline.
APPEND t_general.
CLEAR t_general.
ENDLOOP.
ENDLOOP.
CLEAR cnt.
LOOP AT t_general.
AT NEW be_id.
CLEAR cnt.
ENDAT.
cnt = cnt + 1.
MOVE cnt TO t_general-seqnr.
MODIFY t_general.
CLEAR t_general.
ENDLOOP.
INSERT INTO ztrg_ca_gen_s1 VALUES t_general.
Hi,
Try to debugg which select is not working.In your select,you can add otype and istat and check for the date format of pchobeg , pchoend.
Regards,
Manoj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am getting data in internal table but i am unable to insert data into transparent table
pls give ur suggestion i am sending my code also
SELECT *
INTO TABLE t_gen FROM hrp1002
WHERE plvar EQ '01'
AND objid EQ resulttabnew-objt6+2(8)
AND istat EQ '1'
AND subty EQ '0001'
AND ( begda >= pchobeg AND begda <= pchoend ).
READ TABLE t_gen.
LOOP AT t_gen.
REFRESH t_t1002.
SELECT * INTO TABLE t_t1002
FROM hrt1002
WHERE tabnr EQ t_gen-tabnr.
LOOP AT t_t1002.
MOVE: resulttabnew-objt6 TO t_general-be_id ,
0 TO t_general-tabseqnr,
t_t1002-tline TO t_general-tline.
APPEND t_general.
CLEAR t_general.
ENDLOOP.
ENDLOOP.
LOOP AT t_general.
AT NEW be_id.
CLEAR cnt.
ENDAT.
cnt = cnt + 1.
MOVE cnt TO t_general-seqnr.
MODIFY t_general INDEX sy-tabix TRANSPORTING seqnr.
CLEAR t_general.
IF sy-subrc EQ 0.
describe table t_general lines n.
MOVE-CORRESPONDING t_general TO ztrg_ca_gen_s1.
ENDIF.
ENDLOOP.
LOOP AT t_general.
describe table t_general lines n.
*
*
endloop.
INSERT ztrg_ca_gen_s1.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.