Skip to Content
0
Former Member
Feb 04, 2009 at 05:17 AM

DPR_ATTRIBUTES - Automatic number generation of Project ID

40 Views

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.