on 03-28-2008 9:29 AM
hi GURUS!!
i gave the following case statement in form routine(global definitions-form routine) of the smartform:
CASE VBDKA-VBTYP.
WHEN 'A'.
INQUIRY
WHEN 'B'.
Quotation
WHEN 'C'.
Order confirmation
WHEN 'E'.
Scheduling Agreement Confirmation
WHEN 'G'.
Contract Information
WHEN 'H'.
Returns
WHEN 'I'.
Free-of-charge delivery
WHEN 'K'.
Credit memo request
WHEN 'L'.
Debit memo request
WHEN OTHERS.
Order confirmation
ENDCASE.
I get the error message that "statement in context not permitted".
I declared the case variable vbtyp in the global definitions.
Can someone tell me what could be the mistake here?
Regards
Srihari.
hi try this example:-
IF IS_BIL_INVOICE-HD_GEN-BIL_CAT = 'P'.
TITLE = 'Factura'.
ELSE.
CASE IS_BIL_INVOICE-HD_GEN-BIL_VBTYPE.
when 'M'.
TITLE = 'Factura'.
when 'U'.
TITLE = 'Proforma Invoice'.
when 'N'.
TITLE = 'Cancelamento de Factura'.
endcase.
ENDIF.
And declare INPUT PARAMETERS = IS_BIL_INVOICE
AND OUTPUT PARAMETERS= TITLE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
vishwa,
keep break-point. in the routine and observe it .. whether it is processing properly or not ....
and in the initilization or programlines.... make sure input parameters(using) and output parameters (changing).... these output parameters can be used globally in the smartform....
feel free to contact if still the problem is persisting ..
Cheers,
Sreenivasa sarma k.
Edited by: sharmashree kashi on Mar 28, 2008 6:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi hari,
I have tried in my system its not giving any error....find the below example....
global definitions: *form routines tab....*
FORM GET_TEXTNAME1 using GF_TDNAME.
CASE GF_TDNAME.
WHEN 'x'.
WHEN '2'.
WHEN OTHERS.
ENDCASE.
endform.
*in the initilization.tab....*
PERFORM GET_TEXTNAME1 using GF_TDNAME.
note: make sure GF_TDNAME is in *input parameters*
Dont forgot to Reward me points .....
All the very best....
Regards,
Sreenivasa sarma K.
Edited by: sharmashree kashi on Mar 28, 2008 6:01 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Problem with the code that you have written was u hadnot written 'form..endform'.
Please modify below code as per your requirement.
*form Case_temp using w_a
changing w_string.*
CASE w_a.
WHEN 'A'.
w_string = 'INQUIRY'.
WHEN 'B'.
w_string = 'Quotation'.
WHEN 'C'.
w_string = 'Order confirmation'.
WHEN 'E'.
w_string = 'Scheduling Agreement Confirmation'.
WHEN 'G'.
w_string = 'Contract Information'.
WHEN 'H'.
w_string = 'Returns'.
WHEN 'I'.
w_string = 'Free-of-charge delivery'.
WHEN 'K'.
w_string = 'Credit memo request'.
WHEN 'L'.
w_string = 'Debit memo request'.
WHEN OTHERS.
w_string = 'Order confirmation'.
ENDCASE.
endform.
Write PERFORM for above 'form...endform' as follows:
perform Case_temp using w_actual changing w_string_act.
Please Note: w_a and w_string need not be declared in Global Data as they are local parameters. But, w_actual and w_string_act should be declared in the global data as they are actual parameters.
I think this should solve your problem.
Please reward points if useful.
regards,
Ashlesha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Declare the variable in Global Data tab in Global Definations
In initialization write
perform test using vbtyp.
In input parameter write vbtyp.
In form routine write
*&---------------------------------------------------------------------*
*& Form test
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->PR_VBTYP text
*----------------------------------------------------------------------*
FORM test USING pr_vbtyp TYPE vbtyp.
CASE pr_vbtyp.
WHEN 'A'.
WHEN 'B'.
ENDCASE.
ENDFORM. "test
regards
Sandipan
Edited by: Sandipan Ghosh on Mar 28, 2008 3:15 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.