Application Development and Automation 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: 
Read only

customized table

Former Member
0 Likes
740

I have created a customized table and inserted records via ABAP report. Its working fine at development server but at Production server, neither table is filled nor its giving any error. I have executed it in Background processing as it gives timeout error on foreground .

6 REPLIES 6
Read only

faisalatsap
Active Contributor
0 Likes
716

Hi,

Welcome to SCN

Please USE Meaningful Subject Line for next time

Check may you have created index for table and the index field is going empty.

Regards,

Faisal

Read only

Former Member
0 Likes
716

Razia,

Any authorisation issue.put the code of the report here for filling the table

Thanks

Bala Duvvuri

Read only

0 Likes
716

No authorization issue.

DATA OBJNR LIKE ZCOST-OBJNR.
OBJNR = 0 .
SELECT COUNT(*)  INTO OBJNR FROM ZCOST.

LOOP AT T_FiNAL_DISP INTO wa.
   IF wa IS NOT  INITIAL.
    OBJNR = OBJNR + 1.
    wa-OBJNR = OBJNR.
    wa-GJAHR = p_GJAHR.
    wa-MONAT = p_PERIO.
    INSERT into ZCOST values wa.
  ENDIF.

ENDLOOP.

if sy-subrc = 0.
    MESSAGE 'Successfully Completed .' TYPE 'S'.
endif.

Edited by: Matt on Oct 5, 2010 7:36 AM - added tags

Read only

matt
Active Contributor
0 Likes
716

Presumably T_FiNAL_DISP doesn't contain anything.

Read only

0 Likes
716

Hi Razia,

Code seems fine but please try modyfying it as below and check whether it works or not.

Declare one internal table (itab) of linetype wa.

DATA OBJNR LIKE ZCOST-OBJNR.
OBJNR = 0 .
SELECT COUNT(*)  INTO OBJNR FROM ZCOST.
 
LOOP AT T_FiNAL_DISP INTO wa.
   IF wa IS NOT  INITIAL.
    OBJNR = OBJNR + 1.
    wa-OBJNR = OBJNR.
    wa-GJAHR = p_GJAHR.
    wa-MONAT = p_PERIO.
    append wa to itab.
     ENDIF. 
ENDLOOP.
 
if not itab is initial.
INSERT ZCOST FROM TABLE itab.
commit work.
if sy-subrc = 0.
    MESSAGE 'Successfully Completed .' TYPE 'S'.
endif.
endif.

Regards,

Pawan

Read only

JoffyJohn
Active Contributor
0 Likes
716

you change the message with a simple write statment and then execute in background mode.

If insertion fails, you can see the write message output in the log in SM37 tcode.

Or

check the status of you current background exection in SM37.