Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Data not getting saved in xd01 additional screen

Former Member
0 Likes
999

Hi Expart,

Adding Tab in transaction XD01, In additional tab using 2 custom date fields. these 2 custom fields appending in KNB1 table.

Problem is When i am putting data in custom field but these data are not saved in knb1 table.

Plz. help me kwht is the problem. I am seeing my sample code .

BADI (CUSTOMER_ADD_DATA) method name (CHECK_ADD_ON_ACTIVE)

code is

CONSTANTS : c_x(1) TYPE c VALUE 'X',

c_grp(2) TYPE c VALUE 'BD'.

IF i_screen_group = c_grp.

e_add_on_active = c_x.

ENDIF.

BADI (CUSTOMER_ADD_DATA_CS)

method (GET_TAXI_SCREEN)

Code is

CASE i_taxi_fcode.

WHEN 'SK_TAB'.

e_screen = '7133'.

e_program = 'SAPMZFIE024'.

e_headerscreen_layout = ' '.

ENDCASE.

Method (GET_DATA)

constants: c_eff_from(30) value '(SAPMZFIE024)KNB1-ZINIRID',

c_eff_to(30) value '(SAPMZFIE024)KNB1-ZFINRID'.

field-symbols: <fse1> type any,

<fse2> type any.

assign (c_eff_from) to <fse1>.

if sy-subrc = 0.

s_knb1-zinirid = <fse1>.

endif.

assign (c_eff_to) to <fse2>.

if sy-subrc = 0.

s_knb1-zfinrid = <fse2>.

endif.

custom program (SAPMZFIE024)

In PBO code

CONSTANTS: c_eff_from(30) VALUE '(SAPMF02D)KNB1-ZINIRID',

c_eff_to(30) VALUE '(SAPMF02D)KNB1-ZFINRID'.

FIELD-SYMBOLS: <fse1>, <fse2>.

ASSIGN (c_eff_from) TO <fse1>.

IF sy-subrc = 0.

KNB1-ZINIRID = <fse1>.

ENDIF.

ASSIGN (c_eff_to) TO <fse2>.

IF sy-subrc = 0.

KNB1-ZFINRID = <fse2>.

ENDIF.

  • if transaction opened is for custom master display then the custom fields

  • are made input disabled

IF sy-tcode = c_tcode.

LOOP AT SCREEN.

IF screen-group1 = c_grp.

screen-input = c_no.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

what is the problem in code. Plz. help me.

Thankx for avdvance.

Hi Expart,

Adding Tab in transaction XD01, In additional tab using 2 custom date fields. these 2 custom fields appending in KNB1 table.

Problem is When i am putting data in custom field but these data are not saved in knb1 table.

Plz. help me kwht is the problem. I am seeing my sample code .

BADI (CUSTOMER_ADD_DATA) method name (CHECK_ADD_ON_ACTIVE)

code is

CONSTANTS : c_x(1) TYPE c VALUE 'X',

c_grp(2) TYPE c VALUE 'BD'.

IF i_screen_group = c_grp.

e_add_on_active = c_x.

ENDIF.

BADI (CUSTOMER_ADD_DATA_CS)

method (GET_TAXI_SCREEN)

Code is

CASE i_taxi_fcode.

WHEN 'SK_TAB'.

e_screen = '7133'.

e_program = 'SAPMZFIE024'.

e_headerscreen_layout = ' '.

ENDCASE.

Method (GET_DATA)

constants: c_eff_from(30) value '(SAPMZFIE024)KNB1-ZINIRID',

c_eff_to(30) value '(SAPMZFIE024)KNB1-ZFINRID'.

field-symbols: <fse1> type any,

<fse2> type any.

assign (c_eff_from) to <fse1>.

if sy-subrc = 0.

s_knb1-zinirid = <fse1>.

endif.

assign (c_eff_to) to <fse2>.

if sy-subrc = 0.

s_knb1-zfinrid = <fse2>.

endif.

custom program (SAPMZFIE024)

In PBO code

CONSTANTS: c_eff_from(30) VALUE '(SAPMF02D)KNB1-ZINIRID',

c_eff_to(30) VALUE '(SAPMF02D)KNB1-ZFINRID'.

FIELD-SYMBOLS: <fse1>, <fse2>.

ASSIGN (c_eff_from) TO <fse1>.

IF sy-subrc = 0.

KNB1-ZINIRID = <fse1>.

ENDIF.

ASSIGN (c_eff_to) TO <fse2>.

IF sy-subrc = 0.

KNB1-ZFINRID = <fse2>.

ENDIF.

  • if transaction opened is for custom master display then the custom fields

  • are made input disabled

IF sy-tcode = c_tcode.

LOOP AT SCREEN.

IF screen-group1 = c_grp.

screen-input = c_no.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

what is the problem in code. Plz. help me.

Thankx for avdvance.

5 REPLIES 5
Read only

Former Member
0 Likes
825

Hi,

I am not sure below one will resolve but u can try.

Method (GET_DATA)

constants: c_eff_from(30) value '(SAPMZFIE024)KNB1-ZINIRID',

c_eff_to(30) value '(SAPMZFIE024)KNB1-ZFINRID'.

field-symbols: <fse1> type any,

<fse2> type any.

<fse1> = '(SAPMZFIE024)KNB1-ZINIRID'.

if sy-subrc = 0.

s_knb1-zinirid = <fse1>.

endif.

<fse2> = '(SAPMZFIE024)KNB1-ZFINRID'.

if sy-subrc = 0.

s_knb1-zfinrid = <fse2>.

endif.

In PBO code

CONSTANTS: c_eff_from(30) VALUE '(SAPMF02D)KNB1-ZINIRID',

c_eff_to(30) VALUE '(SAPMF02D)KNB1-ZFINRID'.

FIELD-SYMBOLS: <fse1>, <fse2>.

<fse1> = '(SAPMF02D)KNB1-ZINIRID'.

IF sy-subrc = 0.

KNB1-ZINIRID = <fse1>.

ENDIF.

<fse2> = '(SAPMF02D)KNB1-ZFINRID'.

IF sy-subrc = 0.

KNB1-ZFINRID = <fse2>.

ENDIF.

Read only

Former Member
0 Likes
825

Refer SAP Note 577502

Read only

Former Member
0 Likes
825

Hi,

Please go through the below link.

Regards,

Raj.

Read only

0 Likes
825

Hi

IVE ADDED FIELD ZZFIELD1 & ZZFIELD2 IN KNB1both are date field.

ITS GETTING DISPLAYED IN XD01 AND LETS ME INPUT DATA BUT WHEN I CLICK ON SAVE IT SAYS:"NO CHANGES WERE MADE" AND HENCE NOT GETTING SAVED IN KNA1 AND SO ALSO Z FIELD IS BLANK IN XD02 AND XD03.

ive given screen group 'ZK' in the badi "Prepare Modification-Free Enhancement of Customer Master Rec".

and given the same in screen group in my screen.

PLEASE SUGGEST WAT TO DO INORDER TO SAVE THE DATA.

What is problem . Plz suggest me.

Thanks for Advc.

Regards

Sankar dey

Read only

0 Likes
825

Hi shanker

I am also facing the same problem.

have you found solution for that and can you please share the solution so that it is benificial for other.

Thanks

Raj