on 2023 Jan 31 11:56 AM
Hi. In sap script Is there any code that we can use for refreshing the values per page. Inputted three different document numbers in the selection screen so we're expected to get three pages, and in every page, the values must be cleared in order to put the values that are designated for that certain document number. Will be providing the Syntax that we have below, specifying only the form that we have problem with:
FORM get_billing_details TABLES it_intab STRUCTURE itcsy
it_outab STRUCTURE itcsy.
DATA: wa_intab TYPE itcsy,
wa_outab TYPE itcsy,
l_bukrs TYPE bseg-bukrs,
l_belnr TYPE bkpf-belnr,
l_koart TYPE bseg-koart,
l_zuonr TYPE bseg-zuonr,
l_check TYPE string,
l_bdetails TYPE string,
g_type TYPE dd01v-datatype.
READ TABLE it_intab INTO wa_intab WITH KEY 'BSEG-BUKRS'.
IF sy-subrc EQ 0.
l_bukrs = wa_intab-value.
ENDIF.
READ TABLE it_intab INTO wa_intab WITH KEY 'BKPF-BELNR'.
IF sy-subrc EQ 0.
l_belnr = wa_intab-value.
ENDIF.
SELECT zuonr FROM bseg
INTO l_zuonr
WHERE bukrs = l_bukrs
AND belnr = l_belnr
AND ( koart = 'K' OR koart = 'D' ).
ENDSELECT.
*Check whether first character of material description is NUMERIC or CHAR
CALL FUNCTION 'NUMERIC_CHECK'
EXPORTING
string_in = l_zuonr(1)
IMPORTING
htype = g_type.
CHECK sy-subrc = 0.
REFRESH it_outab.
IF l_zuonr = 'cash' OR l_zuonr = 'Cash' OR l_zuonr = 'CASH'.
wa_outab-name = 'V_ZUONR3'.
wa_outab-value = 'X'.
APPEND wa_outab TO it_outab.
ELSEIF g_type = 'CHAR' AND wa_outab-value NE 'X'.
SPLIT l_zuonr AT '/' INTO l_check l_bdetails.
CONDENSE l_check.
CONDENSE l_bdetails.
wa_outab-name = 'V_ZUONR4'.
wa_outab-value = l_check.
APPEND wa_outab TO it_outab.
wa_outab-name = 'V_BDETAILS'.
wa_outab-value = l_bdetails.
APPEND wa_outab TO it_outab.
ENDIF.
CLEAR: l_belnr, l_bukrs, l_zuonr, g_type, l_check, l_bdetails.
ENDFORM.
Request clarification before answering.
Within your SAPscript code you can use PERFORM command to call any ABAP form routine. This ABAP form routine can return some data to your SAPscript. You can store this data within your SAPscript under any SAPscript symbol, for example a symbol declared by DEFINE command.
This does not work "per page" (whatever you mean with this) - but at the moment when the control comes to the spot where you placed the PERFORM command, so you can decide yourself where/when you want it to be performed.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
122 | |
10 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.