cancel
Showing results for 
Search instead for 
Did you mean: 

Predefined Value in Web Application (BPS)

Former Member
0 Kudos

Hi there,

i have a web-template for manual data entry with 3 variables (Country, Assignment, Period).

The first two variables are derived from BPS (variable per user). The period is an input field. Now i want that the period is automatically pre-defined. Example: if you are in September the period should be 009.2005.

I tried to use How..To-Paper: Call a BPS Web Interface with predefined selections which stated to influence the variable via URL. But that don't work properly.

Here's the URL:

https://xxx-xx.xxx.xxxxx.xxt:xxxx/sap/bc/bsp/sap/testhq/test.htm?area=testarea&bsp-appl=testapplhqQ&...

Does anybody have an idea?

Thanks a lot

Marc

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Suan,

i've made the changes to the variable (SAMPER) and relate to a function module called Z_XXX_DATE_TO_PERIOD_CONVERT.

The module itself works fine and i can attach it to the variable in the planning area.

But when i try to execute the planning the follwoing erroe appears:

Value of variable XXX Period Year ( XXXMPER ) cannot be determined.

Coding looks like this.

FUNCTION Z_SAM_DATE_TO_PERIOD_CONVERT .

*"----


""Local Interface:

*" IMPORTING

*" VALUE(I_DATE) LIKE SY-DATUM DEFAULT SY-DATUM

*" VALUE(I_PERIV) LIKE T009B-PERIV DEFAULT 'V9'

*" EXCEPTIONS

*" INPUT_FALSE

*" T009_NOTFOUND

*" T009B_NOTFOUND

*" OTHERS

*"----


Data: IDATE(7) TYPE C,

E_BUPER LIKE T009B-POPER,

E_GJAHR LIKE T009B-BDATJ,

SAMPER(8) TYPE N.

CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'

EXPORTING

I_DATE = SY-DATUM

I_PERIV = 'V9'

IMPORTING

E_BUPER = E_BUPER

E_GJAHR = E_GJAHR

EXCEPTIONS

INPUT_FALSE = 1

T009_NOTFOUND = 2

T009B_NOTFOUND = 3

OTHERS = 4.

IF SY-SUBRC = 0.

CONCATENATE E_BUPER E_GJAHR INTO SAMPER.

ENDIF.

ENDFUNCTION.

Can you help ?

Message was edited by: Marc Wagener

Message was edited by: Marc Wagener

Former Member
0 Kudos

Hi Marc,

Use a BPS-Var Type Exit and attached it in your layout.

Best Regards,

Suan Liono