07-30-2013 12:23 PM
Dear Sir,
We have a requirement to add a custom filed "location" in CO11n transaction . I have searched the relevant content in sdn and based upon this following steps have been done by me .
a) Using SE11, added a custom filed zlocation in table AFRU. For this I added an Append Structure "zloc" in table AFRU and in this structure defined the field zlocation .
b) Using SE80 , opened functional group XCOF and created a screen 0900 . In the screen Layout created filed AFRU-zlocation
After this , I am not aware as how to proceed further .
I request sap gurus to kindly guide me with all the detail steps as how can we add a custom filed in Co11n and also able to save the entered data .
With thanks and regards
B Mittal
07-30-2013 2:10 PM
Please check if following link helps:
http://wiki.sdn.sap.com/wiki/display/Snippets/Addition+of+custom+fields+to+CO11N+Tcode
Regards
07-30-2013 12:48 PM
Hi,
Please have a look at the following Threads Hope you will fine the answer,
[add field to Va01,va02 |add field to Va01,va02]
[Custom field in VA01|Custom field in VA01 at item level in Additional Data B Tab]
[Changing the atributes of a field in VA01|Changing the atributes of a field in VA01]
Kind Regards,
Abdul.
07-30-2013 2:10 PM
Please check if following link helps:
http://wiki.sdn.sap.com/wiki/display/Snippets/Addition+of+custom+fields+to+CO11N+Tcode
Regards
07-31-2013 5:42 AM
Dear Netweaver Developer
Thanks for post .
I have gone thru the suggested link , but following steps are not clear in this link.
a) Create a module under PAI of the screen 0900 .
b) capture the values entered in the custom fields and export them to memory id.
c) Use the userexit CONFPP05 (PP order conf.: Customer specific enhancements when saving) for updating custom fields into data base table AFRUD(Dialog table for completion confirmations)
I request to kindly guide with detail steps to be used and also the code to be written in exit CONFPP05.
With thanks and regards
B Mittal
07-31-2013 5:57 AM
MODULE USER_COMMAND_0900.
EXPORT <field1> to memory ID 'ZFIELD1'.
IMPORT <field1> from memory ID 'ZFIELD1'.
Dont forget to activate the project.
Regards
07-31-2013 1:13 PM
Dear Netweaver Developer
Thanks for a vary informative and useful reply .
As suggested , I had followed all the mentioned steps by you .
In ZXOFU15, I had given following statement :
IMPORT ZZEMP from memory ID 'ZFIELD1'.
but it is giving error : Field "ZZEMP" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. .
Just to mention , that in screen painter we had created field ZZEMP . In AFRU table also we had appended a structure and this structure has a field ZZEMP .
Request you to kindly help us pl .
With thanks and regards
B Mittal
07-31-2013 7:12 PM
Declare a variable ZZEMP in ZXOFU15.
Data ZZEMP type afru-zzemp.
Regards
08-01-2013 7:31 AM
Dear Netweaver Developer
Thanks for reply .
As per the guidance given , I followed the steps . But now after typing value in for zzemp in Co11n , on pressing the return key the entered value goes away and on saving the transaction there is no value saved in zzemp field of table AFRU .
I have just activated User-Exit : exit_saplcoru_s_100 and it's include zxcofu23 has no code written into it.
I request you to kindly help me to resolve the issue related to saving of custom field entered data
With Regards
B Mittal
--------------------------------------------------------------------------------------------------------------------------
The screen shot of the steps followed by me are as below :
a) Created screen 0900
2) User Exit : exit_saplcoru_s_100 --> Include zxcofu23
3) On Double click on first screen exit with screen 900
On double click user_command_0900
4) User Exit point CONFPP05, User Exit : EXIT_SAPLCORF_105 --> Include
zxcofu15
5) Se11 for table AFRU
08-01-2013 8:20 AM
Please refer to dictionary field on screen. That is name your field AFRU-ZZEMP instead of ZZEMP on screen and use the same field in import statement.
Regards
08-01-2013 9:07 AM
Dear Netweaver Developer
Thanks for nice reply .
As suggested , I have changed the field to AFRU-ZZEMP as per following screen-shot . Now in CO11n on pressing enter , value typed in zzemp is not getting lost . However on saving the posted transaction in AFRU still having blank value in ZZEMP . It means the entered value is not getting saved .
Request you to kindly guide us pl .
With Regards
B Mittal
==========
08-01-2013 9:56 AM
Try as follows:
data: zzemp type AFRU-ZZEMP,wa type afrud.
import afru-zzemp to zzemp from memory id 'ZFIELD1'.
loop at AFRUD_TAB into wa.
wa-zzemp = zzemp.
modify afrud_tab transporting zzemp
endloop.
Regards
08-01-2013 11:07 AM
Dear Netweaver Developer
Thanks for reply.
As suggested , I added the statements in ZXCOFU15 . But still data is not getting saved in AFRU .
On debugging , I found that statement
IMPORT AFRU-ZZEMP from MEMORY ID 'ZFIELD1'
is not populating any value in AFRU-ZZEMP and it remains blank .
Kindly help us pl .
With Regards
B Mittal
08-01-2013 11:20 AM
Have you changed the code of import statement as follows?
data: zzemp type AFRU-ZZEMP,wa type afrud.
import afru-zzemp to zzemp from memory id 'ZFIELD1'.
loop at AFRUD_TAB into wa.
wa-zzemp = zzemp.
modify afrud_tab transporting zzemp
endloop.
Regards
08-01-2013 12:09 PM
Dear Netweaver Developer
Thanks for reply.
Yes , we have defined the data in ZXCOFU15 and the written code is as below.
DATA: ZZEMP TYPE AFRU-ZZEMP.
DATA: wa TYPE AFRU.
import afru-zzemp to zzemp from memory id 'ZFIELD1'.
loop at AFRUD_TAB into wa.
wa-zzemp = zzemp.
modify afrud_tab transporting zzemp.
endloop.
We also request to kindly check that whether the following code written in Include ZXCOFI01 is correct.
MODULE USER_COMMAND_0900 INPUT.
data: afru-zzemp type afru-zzemp.
EXPORT AFRU-ZZEMP to memory ID 'ZFIELD1'.
ENDMODULE.
In the screen 0900 , the created field name is AFRU-ZZEMP .
With thanks and Regards
B Mittal
08-01-2013 4:17 PM
Can you debug and confirm if AFRU-ZZEMP contains value in MODULE USER_COMMAND_0900.
Regards
08-02-2013 5:23 AM
Dear Netweaver Developer
Thanks for providing valuable guidance and helping me to resolve the problem .
With Regards
B Mittal
10-08-2013 5:34 PM
Hi Mittal,
Could you please tell me how did you resolve the issue?
I dint use any EXPORT and IMPORT statements...Instead in Exit CONFPP05 using ASSIGN statement got the custom fields values from screen.
AFRU table is not getting updated even if AFRUD_TAB is updated with custom field values...
can u update me how did you achieve the same?
Regards,
Hari
10-08-2013 5:53 PM
Hi,
Please ignore the post...I just figured out the issue...Its working now...Exit EXIT_SAPLCORU_S_101 solved the issue...
03-25-2014 9:47 AM
I added in CMOD
this enhancements only and it works well
after adding screen field AFRU-USR00 in screen 0900
enhancements CONFPP01 PP order conf.: Determine customer specific default values
--- EXIT_SAPLCORF_101 ----
Code:
TABLES : AFRU .
AFRU-USR00 = AFVGD_IMP-usr00 . "this to default value of user defined screen field usr00
And
enhancement: CONFPP07 Single Screen Entry: Inclusion of User-Defined Subscreens
----- EXIT_SAPLCORU_S_101 ------
Code:
ES_AFRUD-usr00 = AFRU-usr00 . "this to update the database field from the screen field values