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

EXIT_SAPLV56B_001 Function exit implementation

Former Member
0 Likes
2,169

Hi all,

i want to mak mandatory fields in the VT01n and VT02n. I found the function exit EXIT_SAPLV56B_001 and i am not able to implement this exit. if ou have any sample code to make mandatory fields in VT01n and VT02n,

Regards,

Reddy

9 REPLIES 9
Read only

Former Member
0 Likes
1,409

Hello Reddy,

Put a break point inside the function module.This FM is called up in the PBO for each single screen field.

So check the contents of C_SCREEN.

For Example C_SCREEN-name = 'Field name'(here you must find out which field you have to make mandatory, go to screen lay out , you can find the field name.

so if c_scrren-name = 'FIELD name'.

c_screen-input = 0 or 1 this is the way to do it.#

Please see the documentation of this function module below

If, for example, the input readiness of a field has been removed, only the field "Input" in the transfer structure c_screen needs to be set to zero. The field name of the current field can be derived from the field "name" of the transfer structure c-screen. If the structure c_screen was changed, the parameter e_screen_modified must be changed to X (not equal " ").

Notes

The options of the structure c_screen are activated using the value 1 and deactivated with the value 0, for example c_screen-input = 1. Important: if the structure c_screen has been change d, the parameter e_screen_modified must be set to X (not equal ' ').

Regards,

Antony Thomas

Read only

0 Likes
1,409

Hi Thomos,

Thanks for your reply...

I put break point (static, dynamic and system debugging and update debugging all) but it is not stopping to check.

I maintained following code in side.based on screen. please check the below.

IF SCREEN-NAME = 'VTTK-TDLNR' OR

SCREEN-NAME = 'VTTK-ROUTE' OR

SCREEN-NAME = 'VTTK-VSART' OR

SCREEN-NAME = 'VTTK-DPTBZ' OR

SCREEN-NAME = 'VTTK-DPTEN'.

E_SCREEN_MODIFIED = 'X'.

SCREEN-REQUIRED = '1'.

MODIFY SCREEN.

C_SCREEN = SCREEN.

ENDIF.

Please check and correct me if i am wrong.

Read only

0 Likes
1,409

Hi Reddy,

Did you ever find an answer for this? I have the opposite problem.

I get a Z error in VT01N when field VTTK-ADD01 is not filled, I want to disable it, but can not find it in program SAPMV56A.

Regards,

Carlos

Read only

0 Likes
1,409

HI Antony,

when i am trying the following code



IF C_SCREEN-NAME = 'VTTK-TDLNR'.
  E_SCREEN_MODIFIED = 'X'.
C_SCREEN-REQUIRED = '1'.
MODIFY SCREEN.
C_SCREEN = SCREEN.
ENDIF.

the exit is not triggered (that vttk-tdlnr is not getting obligatory)

so can you please suggest me ,

thanks in advance,

kool.

Read only

eduardo_hinojosa
Active Contributor
0 Likes
1,409

Hi

Try it with BADI_LE_SHIPMENT. See Note 617793 - Documentation on Business Add-In BADI_LE_SHIPMENT for further info.

Regards

Eduardo

Read only

madhu_vadlamani
Active Contributor
0 Likes
1,409

Hi Narareddy,

As Eduardo told check badi BADI_LE_SHIPMENT. Try to use the method At_save.

Regards,

Madhu.

Read only

0 Likes
1,409

can you be more specific.

can you please explain in detail regarding that.

Read only

0 Likes
1,409

can you give any sample code for this?

because

when i am trying the following code


IF C_SCREEN-NAME = 'VTTK-TDLNR'.
  E_SCREEN_MODIFIED = 'X'.
C_SCREEN-REQUIRED = '1'.
MODIFY SCREEN.
C_SCREEN = SCREEN.
ENDIF.

the exit is not triggered (that vttk-tdlnr is not getting obligatory)

so can you please suggest me ,

thanks in advance,

kool.

Read only

0 Likes
1,409

Hi

See Note 617793 - Documentation on Business Add-In BADI_LE_SHIPMENT. As note says:



Checking the data of the shipment document on completeness or 
consistency with output of a message, if necessary

for method AT_SAVE. So, if the check is not OK, raise an error with ERROR_WITH_MESSAGE, ie:


    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
              RAISING error_with_message.

I hope this helps you

Regards.

Eduardo

PD: I forgot it. See Note 849243 - Add or Remove delivery from shipments already assigned. You have a coding for this badi and method with a complex coding.

Edited by: E_Hinojosa on Jul 7, 2011 9:36 AM