2023 Nov 01 9:14 AM
I want to use this FORM or SUBROUTINE in other forms.
FORM Z_SELECT_STATEMENT
SELECT *
FROM J_1BNFSTX
INTO @DATA(IT_J1BNFSTX).
ENDFORM.
Now, I want to use it in this form:
FORM COMP_TAX.
PERFORM Z_SELECT_STATEMENT.
"But how do I get the value of the internal from another form into this form?
"I want to use the it_j1bnfstx and maybe loop it into ls_j1bnfstx.
ENDFORM.
FORM COMP_VAT.
PERFORM Z_SELECT_STATEMENT.
"I also want to use the data of Z_SELECT_STATEMENT here in this FORM COMP_VAT.
ENDFORM.
2023 Nov 01 9:21 AM
FORMS are obsolete for new developments, so you shouldn't be using them anyway.
And have you read the documentation on the abap keywords FORM and PERFORM. That should give you your answer.
2023 Nov 01 12:34 PM
I'd give a more detailed answer, but you edit your last question https://answers.sap.com/questions/13993203/how-to-read-the-character-length-the-value-of-a-fi.html to "wrong question", so I'm not sure it's worth it.
2023 Nov 01 12:59 PM
You must NOT do it that way. Please explain the problem you have originally, not the XY problem.
2023 Nov 01 1:35 PM
@Matthew.Billingham WELP. Apologies for that. I have constructed the wrong question.