cancel
Showing results for 
Search instead for 
Did you mean: 

fill a field with a default value the in the shopping card monitor

Former Member
0 Kudos

Dear All

is it possible to  pre-fill the field "Created On" e.g. sy-datum or any default date in the shopping card monitor. If so

pls. let me know on how to achieve this requirement.

Regards

Alex

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Alexander,

try with MODIFY_CRITERIA method from BAdI definition /SAPSRM/BD_PDO_MONITOR_SC.

For this, you have to implement /SAPSRM/BD_PDO_MONITOR_SC enhancement spot.

Parameter CT_SC_DATE should cover your request.

Regards.

Laurent.

Former Member
0 Kudos

Hello Laurent,

thx. I have added this coding:

  data: lv_sc_date type BBPT_BW_SELECT_DATE,

        ls_sc_date type SELECT_DATE.

  move 'I'   TO ls_sc_date-sign.

  move 'EQ'  TO ls_sc_date-option.

  move  sy-datum TO ls_sc_date-low.

  append ls_sc_date TO lv_sc_date.

  ct_sc_date = lv_sc_date.

But the problem is, I can't see the date in the shopping card monitor (in the front-end, NWBC-> Internet-Explorer )

Regards

Alex

Former Member
0 Kudos

Alexander,

I do not think the BAdI method MODIFY_CRITERIA is called before displaying the selection screen. It is invoked once the user clicks SEARCH button after making selections.

You can instead use a Post Exit in WDDOINIT method of webdynpro /SAPSRM/WDC_UI_SC_AMF_CA & view V_AO_SC_SEARCH.

- Ravi

Former Member
0 Kudos

Hi Ravi,

what exactly do you mean with Post Exit in WDDOINIT

These are the available methods:

ONACTIONLAUNCH_HELP

ONACTIONMAXIMIZE_TRAY

ONACTIONMINIMIZE_TRAY

ONACTIONON_SEARCHBUTTON

ONACTIONON_SET_GLOBAL_OPTION

ONACTIONON_UNDOENTRIES

ONACTIONTOGGLE_TRAY

WDDOAFTERACTION

WDDOBEFOREACTION

WDDOEXIT

WDDOINIT

WDDOMODIFYVIEW

WDDOONCONTEXTMENU

Former Member
0 Kudos

Alexander,

You can add a post-exit method to the WDDOINIT method by using Enhancement Framework. This method will get executed immediately after WDDOINIT method. You can populate the context attribute with system date in the post-exit method.

- Ravi.

laurent_burtaire
Active Contributor
0 Kudos

Hello Alexander,

as Ravi wrote it, MODIFY_CRITERIA method is called after clicking onto SEARCH button (which does not correspond to method description "Modifies the search criteria before executing the search").

But id does not matter.

Instead of making WDC method enhancement with Post-Exit, use WD_BADI_DOMODIFYVIEW BAdI definition from WD_BADI enhancement spot to populate fields with default value.

Regards.

Laurent.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Laurent

your answer was correct. I thank you very much.It was really very helpful.

Regards

Hakan