2010 Apr 01 5:48 AM
Hi all,
I had developed a Remote Function module to display all the Pending Purchase orders.
In that i had declares PORANGE as input
In the table parameters i had declared PORANGE as
PORANGE LIKE YMM_SC_BAPIEBELN
YMM_SC_BAPIEBELN is a structure with fields as SIGN OPTION PO_LOW PO_HIGH
now i need to male the values SIGN and OPTION as Default
For that i had coded as below but its not working.
IF PORANGE-PO_LOW IS NOT INITIAL.
PORANGE-SIGN = 'I'.
PORANGE-OPTION = 'BT'.
ELSE.
CLEAR PORANGE[].
ENDIF.
PORANGE[] is having the values which i passed but PORANGE is not containig any values.
Please suggest any solution.
Thanks in advance
Ajay
2010 Apr 01 6:04 AM
Please try using below code :
IF PORANGE[] IS NOT INITIAL.
LOOP AT PORANGE INTO wa_PORANGE.
IF wa_PORANGE-PO_LOW IS NOT INITIAL.
wa_PORANGE-SIGN = 'I'.
wa_PORANGE-OPTION = 'BT'.
MODIFY PORANGE FROM wa_PORANGE TRANSPORTING SIGN OPTION.
ENDIF.
CLEAR : wa_PORANGE.
ENDLOOP.
ELSE.
CLEAR PORANGE[].
ENDIF.Hope this helps.
Please try using below code :
IF PORANGE[] IS NOT INITIAL.
LOOP AT PORANGE INTO wa_PORANGE.
IF wa_PORANGE-PO_LOW IS NOT INITIAL.
wa_PORANGE-SIGN = 'I'.
wa_PORANGE-OPTION = 'BT'.
MODIFY PORANGE FROM wa_PORANGE TRANSPORTING SIGN OPTION.
ENDIF.
CLEAR : wa_PORANGE.
ENDLOOP.
ELSE.
CLEAR PORANGE[].
ENDIF.Hope this helps.
2010 Apr 01 6:04 AM
Please try using below code :
IF PORANGE[] IS NOT INITIAL.
LOOP AT PORANGE INTO wa_PORANGE.
IF wa_PORANGE-PO_LOW IS NOT INITIAL.
wa_PORANGE-SIGN = 'I'.
wa_PORANGE-OPTION = 'BT'.
MODIFY PORANGE FROM wa_PORANGE TRANSPORTING SIGN OPTION.
ENDIF.
CLEAR : wa_PORANGE.
ENDLOOP.
ELSE.
CLEAR PORANGE[].
ENDIF.Hope this helps.
2010 Apr 01 6:18 AM
Hello,
I don't understand the problem you have. But, if you want to pass a range as a parameter for a module function, you have two options:
1. Declare your PORANGE as import parameter, and data type must be TYPE TABLE of YMM_SC_BAPIEBELN. You can make a new Table Type for your YMM_SC_BAPIEBELN in SE11. Or
2. Declare your PORANGE as tables parameter.
Then you can use PORANGE in Select statements, as normally.
Regards,
Julio Almeida
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |