cancel
Showing results for 
Search instead for 
Did you mean: 

DPR_ATTRIBUTES - Automatic number generation of Project ID

Former Member
0 Kudos

Dear All,

I am using the method 'SET_DEFAULTS_UPON_CREATION' in BAdi 'DPR_ATTRIBUTES' for automatic number generation of Project ID in cProjects.

I am able to change the project ID with my new number in CS_ATTRIBUTES. But the same is not getting populated to cprojects screen.

My code --

FIELD-SYMBOLS:

<ls_attributes> TYPE dpr_ts_project_int.

CASE flt_val.

WHEN cl_dpr_co=>sc_ot_project.

ASSIGN cs_attributes TO <ls_attributes>.

CALL FUNCTION 'NUMBER_GET_NEXT'

EXPORTING

nr_range_nr = '01'

object = 'ZXX'

IMPORTING

number = g_pid.

CONCATENATE g_ptype g_pid INTO g_newpid SEPARATED BY '-' .

MOVE g_newpid TO <ls_attributes>-project_id.

ENDCASE.

While debugging the new project ID can be viewed in CS_ATTRIBUTES.

Can you please let me know what might be the issue for not populating on cprojects.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello!

You have also to change external_id attributes. It is this one that is displayed in cprojects screen.

Matthias

Former Member
0 Kudos

Hi Matthias,

Thanks for the reply.

Can you please help me where exactly the external_id attributes needs to be changed.

Your help is greatly appreciated.

Matthias

Former Member
0 Kudos

It's as for the project ID:

MOVE g_newpid TO <ls_attributes>-external_id.

Matthias

Former Member
0 Kudos

Thanks Sir..... It worked.

Answers (0)