cancel
Showing results for 
Search instead for 
Did you mean: 

CJ20N - Copy project

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

former_member184657
Active Contributor
0 Kudos

I dont think this topic is up for discussion in the upcoming Tech'Ed.

pk