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: 

Not able to modify a record in a ZTable created through my Report

ashish_goyal2
Participant
0 Kudos

Hi Team,

I have a ZTable as shown below:

I created an entry in to this table(only highlighted fields are entered not the all fields) through statement:

Modify Ztable from Int.table.

( It is going perfectly) and I can see the entry created.

Now, I am going to update rest of the fields through SM30 for the entry I created through report.

It is accepting and status message is there 'Data was saved' after clicking on save button.

But when I get out of SM 30 and check for that entry, No changes are reflected.

And when I manually create an entry with all fields, It is getting saved correctly. Issue is with the entries created through my report only.

Kindly suggest

Thanks in advance

1 ACCEPTED SOLUTION

ashish_goyal2
Participant
0 Kudos

Hi Team ,

Issue is resolved through below link:

Thanks for your valuable inputs..

17 REPLIES 17

former_member182877
Participant
0 Kudos

Hi Ashish,

Definitley SM30 should not be an issue to MODIFY data in the table which you have updated from ZREPORT. Both are 2 different parties which will not be dependent on each other.

Can you tell me how did you had your SM30 stuff? Is it like you created Ztable --> Table maintanence generator --> gave the function group & screen values and then saved? - If yes, then there should not be any problem.!!!

Please check whether you have any custom changes done / event created in the table!!

Cheers,

Kripa Rangachari.

0 Kudos

Hi Kripa,

You are right.. I have created My table maintenance generator exactly the way you told...

But still issue is coming..

0 Kudos

HI Ashish,

Can you please Re-Generate the TMG and check once again!? Probably you can give a new screen number!

Cheers,

Kripa Rangachari.

0 Kudos

Hi Kripa,

I deleted my TMG and then again regenerated it.

But still its not going right.

0 Kudos

Hi Ashish,

Can you please post your code ..?

What I guess is... you might have run the program again after SM30 changes or something. And, the other non-yellow fields which are blank will overwirte (modify) the changes you did on SM30.

Cheers,

Kripa Rangachari.

0 Kudos

Hi Kripa,

I did not run my report after updating through SM30.

You can see my code below.

LOOP AT it_dumpdata INTO wa_dumpdata WHERE ( systm = wa_tab-systm

                                                AND   tprogram = wa_tab-tprogram

                                                AND   rerror   = wa_tab-rerror ).

             wa_dumpdata_new = wa_dumpdata. " for AT END event

             IF wa_tab-dumpdate <> wa_dumpdata-dumpdate.

             IF wa_dumpdata-objects = wa_tab-objects.

* updating the fields date, time and occurence only in case if dump have occured earlier

               MOVE-CORRESPONDING wa_dumpdata TO wa_dump_tmp.

               MOVE wa_tab-dumpdate TO wa_dump_tmp-dumpdate.

               MOVE wa_tab-dumptime TO wa_dump_tmp-dumptime.

               wa_dump_tmp-occurence = wa_dumpdata-occurence + wa_tab-occurence.

               APPEND wa_dump_tmp TO it_dump_tmp.

               CLEAR wa_dump_tmp.

               EXIT" once data is appended, getting out of the loop for preventing unnecessary iterations

             ELSE.

* Creating a new record in case of diffrent objects getting affected by the dump

               AT END OF tprogram.

                 lv_obj = wa_dumpdata_new-object_set + 1.

                 MOVE-CORRESPONDING wa_tab TO wa_dump_tmp.

                 wa_dump_tmp-object_set = lv_obj.

                 APPEND wa_dump_tmp TO it_dump_tmp.

               ENDAT.

             ENDIF.

             ENDIF.

             CLEAR : wa_dump_tmp, wa_dumpdata.

           ENDLOOP.

       ELSE.

* Creating a new record in table

         MOVE-CORRESPONDING wa_tab TO wa_dump_tmp.

         wa_dump_tmp-object_set = c_0.

         APPEND wa_dump_tmp TO it_dump_tmp.

         CLEAR : wa_dump_tmp.

       ENDIF.

       CLEAR wa_tab.

     ENDLOOP.

     IF it_dump_tmp[] IS NOT INITIAL.

       MODIFY ZCUSTOM_RAHUL FROM TABLE it_dump_tmp" Finally modifying the ZTable




0 Kudos

Hello Ashish,

what is the value of sy-subrc after the modify Statement?.

Regards,

Richard

0 Kudos

Sy-subrc is 0.

roberto_vacca2
Active Contributor
0 Kudos

Hi,

Kripa is correct. Did SM30 accept your OBJECTS field of 1300 char in the view maintenance creation phase?

Hope to help.

Bye

0 Kudos

Hi Roberto,

I have set the length of the field OBJECTS as 255 on screen and if this would be the issue then there should also be problem while creating new entries through SM30.

But New entry is created through SM30 perfectly. Issue is with the records only that are created through my report.

Regards,

Rahul

Former Member
0 Kudos

Hello ;

Did you tried a "commit work" at the end of your custom report ?

Regards

0 Kudos

Hi Hicham.

Yes I did commit work after Modify Statement.

0 Kudos

Try WAIT UPTO 1 SECOND after the modify statement.

0 Kudos

Did but not working..

Balu483
Participant
0 Kudos

i guess this may happened due to activation problem

did you created any tmg event ?.

if yes  then go to se80 and select function group as your tmg function group and active all the components at a time by right clicking  on it .

no go and check in sm30 .

0 Kudos

I did not created any TMG event and I activated my Function group as well

But still issue is there.

ashish_goyal2
Participant
0 Kudos

Hi Team ,

Issue is resolved through below link:

Thanks for your valuable inputs..