Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

QCE1_CONVERT and language validation

Former Member
0 Likes
1,374

Hi Gurus,

In my report selection-screen i have a field language. Through that report i call a smartform. my smartform is available in multiple languages. if user enters any other language besides the one maintained it should throw an error. please advice.

1) which table should i check for languages maintained for respective smartforms.

2) I need to set the message as 'Language selected is not available for form' and then Smartform name should display.

3) Function module which will store the spool requests which i send further to PDF conversion.

4) I'm using fm QCE1_CONVERT to convert my line to 255 char format. what should i pass in the tables.

please help. Tried searching but couldn't find relevant threads.

Thankyou in advance for your help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,057

You can check table stxfadmt for language validation in your smartform. Fetch language and smartform name form this table.

If sy-subrc = 0. Then after the message text write the variable which holds the form name.

For spool check FM RSPO_FIND_SPOOL_REQUESTS and for further info check table TSP01, field rqident = spoolno

Hi Gurus,

In my report selection-screen i have a field language. Through that report i call a smartform. my smartform is available in multiple languages. if user enters any other language besides the one maintained it should throw an error. please advice.

1) which table should i check for languages maintained for respective smartforms.

2) I need to set the message as 'Language selected is not available for form' and then Smartform name should display.

3) Function module which will store the spool requests which i send further to PDF conversion.

4) I'm using fm QCE1_CONVERT to convert my line to 255 char format. what should i pass in the tables.

please help. Tried searching but couldn't find relevant threads.

Thankyou in advance for your help.

6 REPLIES 6
Read only

Former Member
0 Likes
1,058

You can check table stxfadmt for language validation in your smartform. Fetch language and smartform name form this table.

If sy-subrc = 0. Then after the message text write the variable which holds the form name.

For spool check FM RSPO_FIND_SPOOL_REQUESTS and for further info check table TSP01, field rqident = spoolno

Read only

0 Likes
1,057

IF NOT form_name IS INITIAL.

SELECT SINGLE langu FROM stxfadmt INTO (st_langu) WHERE langu = p_spras

AND formname = form_name.

IF sy-subrc NE 0.

MESSAGE e000 WITH 'Language selected is not available for form' .

STOP.

ENDIF.

ENDIF

What should i maintain in my message here so that i can get smartform name after my message.

Read only

0 Likes
1,057
IF NOT form_name IS INITIAL.
SELECT SINGLE langu FROM stxfadmt INTO (st_langu) WHERE langu = p_spras
AND formname = form_name.

IF sy-subrc NE 0.
MESSAGE e000 WITH 'Language selected is not available for form' form_name. <<-Add here
STOP.
ENDIF.
ENDIF
Read only

0 Likes
1,057

Thankyou a lot. Can you please suggest me what to pass in RSPO fm and in qce1_convert . what parameters should i use.

Read only

0 Likes
1,057

Pass your required parameters in EXPORTING and in tables use: spoolreq LIKE rsporq

DATA: pdf LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'QCE1_CONVERT'
    TABLES
      t_source_tab         = pdf
      t_target_tab         = objbin
    EXCEPTIONS
      convert_not_possible = 1
      OTHERS               = 2

Read only

0 Likes
1,057

Thankyou a lot for your time sir.