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: 

updating database table from co11n transaction ?

Former Member
0 Kudos

I got a requirement to add two new addional fields and want to save it in the standard table for reporting purpose. I follwed the steps like :

1. I created new fields in the table AFRU using appending struture. and activated it using se14.

2. I created a project and entered the enhancment (CONFPP07) and i created the screen-exit. then i declared thse two fields in the include : ZXCOFTOP. once i activated the screen exit it appeared in the CO11N TCODE but when i enter some values in this fields , its getting stored in the variable but i dont know how to store this value in the table AFRU .

3. for updating i used the exit CONFPP05 and my would be like AFRUD_TAB-ZZSHIF = CAPTAIN.

but the problem is its not getting updated in the database table AFRU.

should i have to use module ...endmodule in ( SAPLCORU_S - 900 screen , exit : CONFPP07 ) and write code... , like the we follow

for ztransaction or how should i solve this issue ?

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

Try this:

I assume you added field ZZSHIF in table AFRU, and screen field is CAPTAIN.

Implement user exit EXIT_SAPLCORU_S_101 in extension CONFPP07, and let ES_AFRUD-ZZSHIF = CAPTAIN, that's all.

I am not sure you need to implement extension CONFPP05.

sandra

8 REPLIES 8

Sandra_Rossi
Active Contributor
0 Kudos

Try this:

I assume you added field ZZSHIF in table AFRU, and screen field is CAPTAIN.

Implement user exit EXIT_SAPLCORU_S_101 in extension CONFPP07, and let ES_AFRUD-ZZSHIF = CAPTAIN, that's all.

I am not sure you need to implement extension CONFPP05.

sandra

0 Kudos

I did the same but its not working.

0 Kudos

in exit CONFPP05, as AFRUD_TAB is an internal table did you operate on internal table (in your example code, we could think that it's header line)

LOOP AT AFRUD_TAB.
  AFRUD_TAB-ZZSHIF = CAPTAIN
  MODIFY AFRUD_TAB
ENDLOOP.

Edited by: Sandra Rossi on Oct 15, 2008 5:29 PM

0 Kudos

Hi Sandra,

I worked with your code but still not working... all other data is getting saved to database table except my fields ......what will be the problem........

Thanks,

Siva

0 Kudos

please show us all your code

0 Kudos

Exit Name : CONFPP07

In PBO - EXIT_SAPLCORU_S_100

move is_afrud to wa_afrud.

wa_afrud-zzshif = shift.

In PAI: EXIT_SAPLCORU_S_101

move wa_afrud to es_afrud.

***********************************

Exit Name : CONFPP05

In Exit : EXIT_SAPLCORF_105

LOOP AT AFRUD_TAB.

AFRUD_TAB-ZZSHIF = 'A'.

MODIFY AFRUD_TAB.

ENDLOOP.

0 Kudos

So, according to your code, it means that :

1) your screen field is WA_AFRUD-ZZSHIF

2) WA_AFRUD is declared as global (in ZXCOFTOP)

Is that true?

In PAI: EXIT_SAPLCORU_S_101, you should only do:

move wa_afrud-zzshif to es_afrud-zzshif.

In Exit : EXIT_SAPLCORF_105, you have to replace 'A'

LOOP AT AFRUD_TAB.
AFRUD_TAB-ZZSHIF = *wa_afrud-zzshif.* "'A'
MODIFY AFRUD_TAB.
ENDLOOP.

Note that LOOP AT is problable not the good coding (I think that this exit has to remain empty), it was just a test to check it works

Did you think to activate your project in CMOD? (you have to activate both project, and the exits)

Are you sure your exit is called. Did you debug it?

See also Note 12831 (program SAPRSMODCHECK) to check there is no problem between project/exits

Edited by: Sandra Rossi on Oct 17, 2008 6:59 PM

madhu_vadlamani
Active Contributor
0 Kudos

Hi Siva,

I need some help adding a sub screen to co11n screen. I added a sub screen with this exit . I am not able to see that in c011n initial screen . Please share me your ideas how you added that to appear in co11n.

Regards,

Madhu.