문제

So i have this:

SELECT-OPTIONS gr_saord FOR gv_sales_order OBLIGATORY.

then

PERFORM check_values CHANGING gr_saord.

then

FORM check_values CHANGING p_gr_saord TYPE selopt.

What i also tried was instead of the structure SELOPT to use the Table Type piq_selopt_t and instead of passing gr_saord to pass gr_saord[].

The presented version of the code and the alternative result both in the same error message:

in PERFORM or CALL FUNCTION "CHECK_VALUES", the actual parameter "GS_SAORD" is incompatible with the formal parameter "P_GR_SAORD".

Basically i want to simply pass a SELECT-OPTIONS table as a parameter and can't manage to do it.

도움이 되었습니까?

해결책

It's because selopt and piq_selopt_t are not for vbak-vbeln. Low and High are typed differently in those data types compared to your select option.

This should work

data: gv_sales_order type vbap-vbeln.

types: tr_vbeln like RANGE OF gv_sales_order.

SELECT-OPTIONS: gs_saord for gv_sales_order.


perform check_values CHANGING gs_saord[].

form check_values CHANGING p_gr_saord TYPE tr_vbeln.

endform.

다른 팁

If you are lazy (and have a lot select options to pass) and you onyl need to pass them to a select statement within your FORM, you can skip the type definition and define you form with

perform check_values CHANGING gs_saord[].

form check_values CHANGING p_gr_saord TYPE standard table.

endform.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top