Skip to Content
author's profile photo Former Member
Former Member

Output Control Conversion between SAPScript and Smartforms

I know there are structure ITCPO for SAPScript and SSFCTRLOP/SSFCOMPOP for Smartform output conrol. I am desgin the smartform to replace standard Sapscript form for carton label, in standard program all communction type datas are for scriptform as below, so I just want to know how can I convert it from ITCPO into SSFCTRLOP/SSFCOMPOP for smartform since the printout running background?!

___________________________________________________

MOVE-CORRESPONDING NAST TO LVS_SNAST.

MOVE SY-REPID TO LVF_PROGRAM.

CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'

EXPORTING

PI_COMM_TYPE = LVS_COMM_TYPE

PI_COMM_VALUES = LVS_COMM_VALUES

PI_SCREEN = US_SCREEN

  • PI_NEWID =

PI_COUNTRY = US_COUNTRY

PI_REPID = LVF_PROGRAM

PI_SNAST = LVS_SNAST

IMPORTING

PE_ITCPO = LVS_ITCPO

PE_DEVICE = LVF_DEVICE

PE_MAIL_RECIPIENT = LVS_RECIPIENT

PE_MAIL_SENDER = LVS_SENDER

EXCEPTIONS

COMM_TYPE_NOT_SUPPORTED = 1

RECIPIENT_CREATION_FAILED = 2

SENDER_CREATION_FAILED = 3

OTHERS = 4.

IF SY-SUBRC <> 0.

RETCODE = SY-SUBRC.

SYST-MSGTY = 'E'.

PERFORM PROTOCOL_UPDATE.

ENDIF.

check retcode eq 0.

  • if there is no communication type

IF LVS_COMM_TYPE IS INITIAL.

  • set device

CASE NAST-NACHA.

WHEN '1'.

LVF_DEVICE = 'PRINTER'.

WHEN '2'.

LVF_DEVICE = 'TELEFAX'.

LVS_ITCPO-TDTELENUM = NAST-TELFX.

IF NAST-TLAND IS INITIAL.

LVS_ITCPO-TDTELELAND = US_COUNTRY.

ELSE.

LVS_ITCPO-TDTELELAND = NAST-TLAND.

ENDIF.

LVS_ITCPO-TDSENDDATE = NAST-VSDAT.

LVS_ITCPO-TDSENDTIME = NAST-VSURA.

LVS_ITCPO-TDFAXUSER = NAST-USNAM.

WHEN '3'.

LVF_DEVICE = 'TELETEX'.

LVS_ITCPO-TDTELENUM = NAST-TELTX.

IF NAST-TLAND IS INITIAL.

LVS_ITCPO-TDTELELAND = US_COUNTRY.

ELSE.

LVS_ITCPO-TDTELELAND = NAST-TLAND.

ENDIF.

LVS_ITCPO-TDSENDDATE = NAST-VSDAT.

LVS_ITCPO-TDSENDTIME = NAST-VSURA.

WHEN '4'.

LVF_DEVICE = 'TELEX'.

LVS_ITCPO-TDTELENUM = NAST-TELX1.

IF NAST-TLAND IS INITIAL.

LVS_ITCPO-TDTELELAND = US_COUNTRY.

ELSE.

LVS_ITCPO-TDTELELAND = NAST-TLAND.

ENDIF.

LVS_ITCPO-TDSENDDATE = NAST-VSDAT.

LVS_ITCPO-TDSENDTIME = NAST-VSURA.

WHEN OTHERS.

LVF_DEVICE = 'PRINTER'.

ENDCASE.

ENDIF.

  • fill structure itcpo

ITCPO = LVS_ITCPO.

  • insert note 508569 {

  • OTF-Output, wenn Browser-Druck

if nast-sort1 = 'EBPP'.

lvs_itcpo-tdgetotf = 'X'.

endif.

  • } end note 508569

_____________________________________________

Any suggestion would be appreciated!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 06:21 AM

    I've fixed it

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.