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

BADI_FDCB_SUBBAS04 Problem

spinellll
Participant
0 Likes
5,961

fb60-badi.pngI need to add a 1 byte field to FB60. The field will not reside in any table such as BSEG of BKPF but rather, will be used as a flag to conditionally execute some other code.

I've added the field to the screen (see attached) and have implemented BADI_FDCB_SUBBAS04 with me->if_ex_badi_fdcb_subbas04~invfo = im_invfo (In the PUT) and ex_invfo = me->if_ex_badi_fdcb_subbas04~invfo (In the GET).

I've added the field to INVFO (See attached).

However, whenever I enter a value in the new field and hit any other key, the screen field is being cleared. The value that I enter is not being retained.

Thanks

Leo

fb60-badi.pngI need to add a 1 byte field to FB60. The field will not reside in any table such as BSEG of BKPF but rather, will be used as a flag to conditionally execute some other code.

I've added the field to the screen (see attached) and have implemented BADI_FDCB_SUBBAS04 with me->if_ex_badi_fdcb_subbas04~invfo = im_invfo (In the PUT) and ex_invfo = me->if_ex_badi_fdcb_subbas04~invfo (In the GET).

I've added the field to INVFO (See attached).

However, whenever I enter a value in the new field and hit any other key, the screen field is being cleared. The value that I enter is not being retained.

Thanks

Leo

16 REPLIES 16
Read only

FredericGirod
Active Contributor
5,562

Looks like you have not code performed in the PAI

Read only

former_member182371
Active Contributor
0 Likes
5,562

Please do search in the forums.

e.g.

Custom Field value gets cleared in BADI_FDCB_SUBBAS04

wiki

Best regards,

Pablo

Read only

spinellll
Participant
0 Likes
5,562

Frederic

See attached. The field invfo-start_workflow is being sent and received but not the zztax field.

Leo

Read only

spinellll
Participant
0 Likes
5,562

Thanks Pablo

I read those pieces yesterday but fail to see how they address this specific issue.

Leo

Read only

0 Likes
5,562

did you have a look at the wiki below?

Display customer fields in header of logistics invoice verification transactions

if you follow and check the steps needed i believe you´ll be able to solve the problem.

Best regards,

Pablo

Read only

0 Likes
5,562

Thanks for the quick replies.

Pablo, referring to your wiki, I did look at it a few days ago.

To quote:

Screen fields: The fields must be in structure INVFO. This was done.

If the values in the FI document are to be saved, the fields must also be in table BKPF or BSEG. My request is for FI (FB60), yours was for MM. The screen value is not to be saved on any table. It's to be used as a switch for a customer-function. So, it would seem that it's not required that the new field be appended to a table.

All of the PUTs and GETs in the PBO and PAI already existed for a prior custom field (invfo-start_workflow) that was used in MIRO many years ago. The only code I added to the PAI was for zztax:

* implement from here on customer coding
* enumerate ALL fields on the screen because of field transportation
* with or within a module
FIELD:
invfo-start_workflow,
invfo-zztax.

I can try appending BKPF to see if it has any affect.

Leo

Read only

0 Likes
5,562

Hi,

i believe you need this part:

"So I created my customer fields in append structures of:

INVFO, RBKP, RBKP_V, ACMM_VENDOR_COMP."

if not the value of zztax will always be blank.

Best regards,

Pablo

Read only

0 Likes
5,562

Pablo, I appended the field to BKPF and it appears to work.

I didn't think that was necessary as I don't need to save the field in a table but Asi es la vida!

Thanks again for the assistance.

Leo

Read only

0 Likes
5,562

so you´re only interested in that field value when "posting"?

Best regards,

Pablo

Read only

0 Likes
5,561

Correct. That's the next challenge.

Read only

rupesh_brahmankar
Active Contributor
5,561

Hello,

Please refer SAP note 2806250 - INVFO fields are overwritten

Best Regards,

R.Brahmankar

Read only

0 Likes
5,561

R.

Thanks. Already applied.

Read only

0 Likes
5,561

Hello,

Please check another SAP note in same area, 2830829 - INVFO fields are overwritten

Best Regards,

R.Brahmankar

Read only

spinellll
Participant
0 Likes
5,561

Ok, I appended the field to BKPF and it appears to work.

I didn't think that was necessary as I don't need to save the field in a table but Asi es la vida!

Thanks again for the assistance.

Leo


Read only

0 Likes
5,561

If the field is to exist on one screen only during the transaction, and not to be stored in the database, adding the field to the database is the worst solution.

Unfortunately, you don't describe in details when you use this checkbox (at save time? when exactly?), so it's difficult to help.

Read only

5,561

Upon SAVE.

And I agree about the database but it appears to be the only way to preserve the screen value while employing the BADI.