cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Form dumps in Web Dynpro ABAP Application but opens up by Report

Former Member
0 Kudos

Hello Experts,

I created a form and tested it by creating a report which contains following code,

call function 'FP_FUNCTION_MODULE_NAME'

exporting

i_name = lv_form_name "my form name

importing

e_funcname = iv_function_name.

*retrieve data in lt_items

call function iv_function_name

exporting

/1bcdwb/docparams = fp_docparams

it_item = lt_items

is_header = is_header

control_parameter = ls_control_parameters

importing

/1bcdwb/formoutput = fp_formoutput

exceptions

usage_error = 1

system_error = 2

internal_error = 3.

However when I try to do it on click of a button in my Web Dynpro Application, it dumps (the action has very much the similar code).

The error is: USAGE_ERROR

SY-TITLE HTTP Control

SY-MSGTY E

SY-MSGID FPRUNX

SY-MSGNO 111

Thanks in advance for your help.

Best regards,

Abir

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Could you turn on the ST22 or use debugger and tell me exactly where the program dumps. Otto

Former Member
0 Kudos

Hi Otto,

I try to paste the ST22 log below.

Short text

Exception condition "USAGE_ERROR" raised.

Error analysis

A RAISE statement in the program "SAPLFPCALL" raised the exception

condition "USAGE_ERROR".

Since the exception was not intercepted by a superior

program, processing was terminated.

Short description of exception condition:

For detailed documentation of the exception condition, use

Transaction SE37 (Function Library). You can take the called

function module from the display of active calls.

Source Code Extract

Line SourceCde

16 * Return of PDF is always possible.

17 IF ie_outputparams-device IS NOT INITIAL AND

18 ie_outputparams-device <> 'PRINTER'.

19 * Devices TELEFAX and MAIL are not allowed in many cases.

20 IF ie_outputparams-nodialog = c_false

21 OR ie_outputparams-preview = c_false

22 OR ie_outputparams-noprint = c_false

23 OR ( ( ie_outputparams-arcmode = '2' OR ie_outputparams-arcmode = '3' )

24 AND ie_outputparams-noarchive = c_false ).

25 * Dialog or no preview; preview only if no output or archiving requested.

26 MESSAGE ID 'FPRUNX' TYPE 'E' NUMBER '110'

27 WITH ie_outputparams-device RAISING usage_error.

28 ENDIF.

29 ENDIF.

30 ENDIF.

31

32 * Call the internal interface.

33 move-corresponding ie_outputparams to l_params.

34

35 call function 'FPCOMP_JOB_OPEN'

36 changing

37 ie_outpar = l_params

38 exceptions

39 cancel = 1

40 usage_error = 2

41 system_error = 3

42 internal_error = 4.

43 case sy-subrc.

44 when 0.

45 when 1. raise cancel.

>>>>> when 2. raise usage_error.

47 when 3. raise system_error.

48 when 4. raise internal_error.

49 endcase.

50

51 move-corresponding l_params to ie_outputparams.

52

53 endfunction.

Contents of system fields

Name Val.

SY-SUBRC 2

SY-INDEX 7

SY-TABIX 0

SY-DBCNT 0

SY-FDPOS 70

SY-LSIND 0

SY-PAGNO 0

SY-LINNO 1

SY-COLNO 1

SY-PFKEY

SY-UCOMM

SY-TITLE HTTP Control

SY-MSGTY E

SY-MSGID FPRUNX

SY-MSGNO 111

SY-MSGV1

SY-MSGV2

SY-MSGV3

SY-MSGV4

SY-MODNO 0

SY-DATUM 20101110

SY-UZEIT 091449

SY-XPROG SSO2GETPARAM

SY-XFORM GET_PARAMETER

Chosen variables

Name

Val.

No. 20 Ty. FUNCTION

Name FP_JOB_OPEN

IE_OUTPUTPARAMS

PRINTER XX 00#䄀### #䄀### X ##00000000000000 00>

0000000000000000000000000000000000000000000000004000000040000000000000000000000000000000000000

0000000000000000000000000000000000000000000000001000000010000000000000000000000000000000000000

5544545255222222222222222222222222222222222223300000222000002222225222003333333333333322233344

029E4520880000000000000000000000000000000000000000000000000000000080000000000000000000000000C9

005000520049004E005400450052002000580058002000200020002000200020002000200020002000200020002000

SYST-REPID

SAPLFPCALL

0000000000000000000000000000000000000000

0000000000000000000000000000000000000000

5454454444222222222222222222222222222222

310C6031CC000000000000000000000000000000

005300410050004C0046005000430041004C004C002000200020002000200020002000200020002000200020002000

%_SPACE

0

0

2

0

0020

SY-SUBRC

2

0000

0002

00000002

SY-REPID

SAPLFPCALL

0000000000000000000000000000000000000000

0000000000000000000000000000000000000000

5454454444222222222222222222222222222222

310C6031CC000000000000000000000000000000

005300410050004C0046005000430041004C004C002000200020002000200020002000200020002000200020002000

%_DUMMY$$

0000

0000

2222

0000

0020002000200020

SY-MSGV3

00000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000

22222222222222222222222222222222222222222222222222

00000000000000000000000000000000000000000000000000

0020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000

SY-MSGNO

111

000

000

333

111

003100310031

%_VIASELSCR

#

0

4

04

SY-MSGV4

00000000000000000000000000000000000000000000000000

00000000000000000000000000000000000000000000000000

22222222222222222222222222222222222222222222222222

00000000000000000000000000000000000000000000000000

0020002000200020002000200020002000200020002000200020002000200020002000200020002000200020002000

SPACE

0

0

2

0

0020

Application Calls

Index Calls

1 R=7 P=/sap/bc/webdynpro/sap/INM_WORKCENTER_APP/

Internal notes

The termination was triggered in function "ab_jfune"

of the SAP kernel, in line 3058 of the module

"//bas/720_REL/src/krn/runt/abfunc.c#3".

The internal operation just processed is "FUNE".

Internal mode was started at 20101110091356.

Lock Shared Objects

ModeLockRe Area Name

Instance Name Clt Lock Type

VersionId Label Include Line Time Stamp

1 CL_WDR_CONF_APPL_SHM

INM_WORKCENTER_APP. 102 R

178 5690 CL_WDR_CONF_APPL_SHBROKER=====CM001 9 20101110091356

2 CLUR_NW7_MESSAGE_AREA

E R

10 10 CLUR_NW7_MESSAGES=============CM003 11 20101110091356

3 CL_WDR_CFG_COMP_SHM

INM_WORKCENTER_COMP.AD4B75FF707A473CD26008949EBB0A69.07..E 102 R

11 12 CL_WDR_CFG_COMP_SHBROKER======CM006 29 20101110091359

Directory of Application Tables

Name Date Time Lngth

Val.

Program SAPMHTTP

SYST . . : : 00004612

\0\x0007\0\0\0\0\0\x0001\0\0\0\0\0\x0001\0\0\0\0\0\0\0\0\0

SY . . : : 00004612

\0\x0007\0\0\0\0\0\x0001\0\0\0\0\0\x0001\0\0\0\0\0\0\0\0\0

Program SAPLHTTP_RUNTIME

ICFBUFFER . . : : 00005624

ICFSERVICE . . : : 00004040

SAP 0000000000000000000000000DFFAEATGKMFLCDXQ04

Program CL_HTTP_SERVER================CP

RSJOBINFO . . : : 00000164

00000000000000

Program SAPLLANG

T002 . . : : 00000010

ES1EN|

Program SAPLSSFG

SSFARGS . . : : 00001734

Program CL_WDR_CLIENT_ABSTRACT_HTTP===CP

INDX . . : : 00003104

102BMWD_SP_LEVEL \0\0\0 00000000

Program CONTEXT_X_TR_SYS_PARAMS

CONTEXTB . . : : 00002992

102EBTR_SYS_PARAMS 000007000100000000000000\0\0\0\0

TCONT . . : : 00000068

TR_SYS_PARAMS 20100623230418|

Program CL_WDR_TRACE_TOOL=============CP

INDX . . : : 00003104

102BMSWD_TRACETOOL_ACTIVEAR\0\0\0 00000000

Program SAPLSKWF_NAMESPACE

SKWF_URLIO . . : : 00000384

102BBMIME/sap/public/bc/ur/nw5/themes/custom

Program SAPLSDCL

SDOKIOCL . . : : 00000600

SDOKIOCLT . . : : 00000150

SDOKLOCL . . : : 00000754

00000000000000 0000000000

SDOKLOTAB . . : : 00000362

SDOKPHTAB . . : : 00000662

Program SAPLISOC

T002 . . : : 00000010

ES1EN|

Program CL_CALENDAR_DEFINITION_CALLER=CP

INDX . . : : 00003104

102ARCAL_DEF \0\0\0 00000000

Program CL_WDR_LS_JS_TIMESTAMP========CP

INDX . . : : 00003104

102BMCL_WDR_LS_JS_TIME... \0\0\0 00000000

Program CL_WDR_WINDOW=================CP

RSJOBINFO . . : : 00000164

00000000000000

Program CL_WDR_DELEGATING_VIEW========CP

RSJOBINFO . . : : 00000164

00000000000000

Program CL_CGPL_USER_OPTIONS==========CP

CGPLT_OPT_INDX . . : : 00003040

102OP* RPM \0\0 0

Program SAPLBDLS

T000 . . : : 00000214

102GCC:GTv1-5.IK.PLN Dev CltGDC CHF

Program SAPLSDEX

DD07L . . : : 00000120

/GLB/7PTIR_GLB_PROJSTATUS A00020000R

Program SAPLSSCU

USR02 . . : : 00000942

102ARAYCHA \0\0\0\02010032499991231AGCCSC_EU \0

Program SAPLPRGN

AGR_DEFINE . . : : 00000266

102TM15_GLB_XX_ZR4026A_PLN01

Program SAPLSDOC

DOKHL . . : : 00000306

TXLG1B0000062000009

DOKTL . . : : 00000296

Program SAPLSI63

IWBSETTING . . : : 00000260

Program SAPLSR11

TADIR . . : : 00000464

Program SAPLSUGU

CVERS . . : : 00000102

SAP_BW 702 0004 W|

Program SAPLSUG2

SVERS . . : : 00000144

702

Program CONTEXT_X_IWB_CLASS_PROPS

CONTEXTB . . : : 00002992

102IBIWB_CLASS_PROPS 000007000300000000000000\0\0\0\0

TCONT . . : : 00000068

IWB_CLASS_PROPS 20010206162330|

Program SAPLTIW1

IWTESTFCTS . . : : 00000052

|

Program SAPLSDCS

SDOKDOCSP . . : : 00000148

Program SAPLSDSD

DDSHOFFLD . . : : 00003020

IF/RPM/TS_ITEM_D_DATA_CUST YYGLB_SEVERITY

Program /1BCWDY/EI2AA7ZECUCSFD0NKHM6==CP

RSJOBINFO . . : : 00000164

00000000000000

Program SAPLSUNI

TFDIR . . : : 00000268

Program SAPLBDS_METHODS

BDS_LOCL . . : : 00000350

DEVC_STXD_BITMAP OTBDS_LOC3 BDS_POC3 BDS_RE

I really appreciate your help.

Many thanks and best regards,

Abir

OttoGold
Active Contributor
0 Kudos
IF ie_outputparams-device IS NOT INITIAL AND 18 ie_outputparams-device 'PRINTER'. 19 * Devices TELEFAX and MAIL are not allowed in many cases. 20 IF ie_outputparams-nodialog = c_false 21 OR ie_outputparams-preview = c_false 22 OR ie_outputparams-noprint = c_false 23 OR ( ( ie_outputparams-arcmode = '2' OR ie_outputparams-arcmode = '3' ) 24 AND ie_outputparams-noarchive = c_false ). 25 * Dialog or no preview; preview only if no output or archiving requested. 26 MESSAGE ID 'FPRUNX' TYPE 'E' NUMBER '110' 

This part looks useful, I still believe there is a mismatch in the settings. Try to remove everything what is not absolutely necessary and try again. I have no better answer. I would have to see your whole coding and be able to change it and test it. Pasting logs will not help us get any further.

Otto

Former Member
0 Kudos

Hi Otto,

You were absolutely right in pointing out the parameters. Removing them all and putting just the following:

fp_outputparams-getpdf = 'X'.

fp_outputparams-device = 'PRINTER'.

fp_outputparams-preview = space.

works.

Many thanks to you.

Best regards,

Abir

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

Hello,

could it be ike this:

You run the code from the report without any problems (because the report accepts the response - the form - and displays it). But when you run the code from WDA, there is nobody listening...? I mean: you need to attach the result/ the PDF file to the response like any other file, which will result into a dialog of your browser saying "save as". Or: you need to create a WDA field/ element, which will be a PDF container, where you will set the form data as this container data and the container will display the form for you.

If I didn´t get your problem, could you please describe it in greater detail?

Have a nice day,

Cheers Otto

Former Member
0 Kudos

Hello Otto,

Many thanks to you for the quick response.

The scenario is as follows:

1. I have the Interactive Form UI Element defined in the Web Dynpro Component which is bound to an attribute of type xString

2. After retrieving all the display-data, the PDF is generated as follows:

data : i_name type fpname,

i_funcname type funcname.

data : fp_docparams type sfpdocparams,

fp_formoutput type fpformoutput,

fp_outputparams type sfpoutputparams, "X

ls_output type sfpjoboutput.

data: ls_control_parameters type ssfctrlop.

data: l_adserrstr type string.

data: lv_language type laiso.

fp_outputparams-reqnew = 'X'.

fp_outputparams-device = 'PRINTER'.

  • fp_outputparams-DEST = ITCPO-TDDEST.

fp_outputparams-nodialog = 'X'.

fp_outputparams-reqimm = ' '.

fp_outputparams-copies = syst-prcop. "one copy

if not iv_preview is initial.

fp_outputparams-preview = 'X'. " preview

fp_outputparams-getpdf = ' '.

else.

fp_outputparams-preview = ' '. " no preview

fp_outputparams-getpdf = 'X'.

endif.

fp_outputparams-cover = syst-prbig.

fp_outputparams-dataset = 'LIST7S'. "dataset name

fp_outputparams-suffix1 = 'TAXF'. "test run

fp_outputparams-suffix2 = 12. "name of report variant

fp_outputparams-pdltype = iv_language.

call function 'FP_JOB_OPEN'

changing

ie_outputparams = fp_outputparams.

data lv_lang type tcp0c-langu.

data lv_cntry type tcp0c-country.

data lv_mod type tcp0c-modifier.

get locale language lv_lang country lv_cntry modifier lv_mod.

call function iv_function_name

exporting

/1bcdwb/docparams = fp_docparams

it_item = it_items "display structure elements

is_header = is_header "header elements

control_parameter = ls_control_parameters

importing

/1bcdwb/formoutput = fp_formoutput

exceptions

usage_error = 1

system_error = 2

internal_error = 3.

*

if sy-subrc ne 0.

call function 'FP_GET_LAST_ADS_ERRSTR'

importing

e_adserrstr = l_adserrstr.

endif.

*

call function 'FP_JOB_CLOSE'

importing

e_result = ls_output

exceptions

usage_error = 1

system_error = 2

internal_error = 3

others = 4.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

rv_pdf_document = fp_formoutput-pdf.

I bound this rv_pdf_document to the attribute corresponding to the form. Kindly let me know if I could try something else.

The ST22 dump analysis says:

SY-TITLE HTTP Control

SY-MSGTY E

SY-MSGID FPRUNX

SY-MSGNO 111

SY-MSGV1

SY-MSGV2

SY-MSGV3

SY-MSGV4

SY-MODNO 0

SY-DATUM 20101110

SY-UZEIT 102018

SY-XPROG SSO2GETPARAM

SY-XFORM GET_PARAMETER

Thanks again for your time and have a nice day too,

Cheers,

Abir

OttoGold
Active Contributor
0 Kudos

I believe the problem is with the following part. Why: a) i don´t use most of the parameters, never. b) can imagine that printing from a report and output into a WDA container have many differencies. So what I would do: I would comment out everything, or most of the things and try again with WDA. Once you get a working solution, you can start looking for an attribute, which is wrong. Or, if you don´t like the idea, move the code into the IF branch for non-WDA (PREVIEW = 'X').

data : fp_docparams type sfpdocparams,
fp_formoutput type fpformoutput,
fp_outputparams type sfpoutputparams, "X
ls_output type sfpjoboutput.

data: ls_control_parameters type ssfctrlop.
data: l_adserrstr type string.
data: lv_language type laiso.

fp_outputparams-reqnew = 'X'.
fp_outputparams-device = 'PRINTER'.
* fp_outputparams-DEST = ITCPO-TDDEST.
fp_outputparams-nodialog = 'X'.
fp_outputparams-reqimm = ' '.
fp_outputparams-copies = syst-prcop. "one copy

if not iv_preview is initial.
fp_outputparams-preview = 'X'. " preview
fp_outputparams-getpdf = ' '.
else.
fp_outputparams-preview = ' '. " no preview
fp_outputparams-getpdf = 'X'.
endif.

fp_outputparams-cover = syst-prbig. 
fp_outputparams-dataset = 'LIST7S'. "dataset name
fp_outputparams-suffix1 = 'TAXF'. "test run
fp_outputparams-suffix2 = 12. "name of report variant
fp_outputparams-pdltype = iv_language.

Otto

Former Member
0 Kudos

Hi Otto,

I commented the unnecessary parameters, they were indeed unnecessary

However the dump is not resolved. Is there anything else I could check? Is there any other way to generate the PDF?

Thanks again for your time and help.

Best regards,

Abir