on 10-30-2009 2:54 PM
Hello Experts,
Iam copying a project from a template project in CJ20N.
While coopying i could see all the fields getting copied into PRPS except the filed PSPNR (Its being copied as '99999999').
When i save the project , go back and come back into the same project. i could see the PRPS-PSPNR field is updated with new number. I understand, that the system will automatically generates this number while posting the project.
But i would like to know is there any way we get this number before posting the project. because we have created a customer enhnaced screen in CJ20N and depends on this new number we have to update the new screen fields.
Please help if anybody know the answer.
thanks
method IF_EX_PROJECTDEF_UPDATE~AT_SAVE
DATA INTERVAL TYPE NRIV.
DATA PSPNR TYPE CJBAI_PROJECTDEFINITION-PSPNR.
IF IM_PROJECTDEFINITION-PSPNR = '99999999'.
CALL FUNCTION 'NUMBER_GET_INFO'
EXPORTING
NR_RANGE_NR = '01'
OBJECT = 'PROJ'
SUBOBJECT = ' '
TOYEAR = '0000'
IMPORTING
INTERVAL = INTERVAL
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
OBJECT_NOT_FOUND = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
MESSAGE 'Projects Interval Not Found' type 'I'.
ENDIF.
lv_pspnr = INTERVAL-NRLEVEL+10(10).
lv_pspnr = lv_pspnr + 1.
else.
lv_pspnr = IM_PROJECTDEFINITION-PSPNR
endif.
endmethod.
.
Edited by: SHASHANK JAISWAL on Dec 14, 2011 9:56 AM
Edited by: SHASHANK JAISWAL on Dec 14, 2011 9:58 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I dont think this topic is up for discussion in the upcoming Tech'Ed.
pk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.