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

Formatting Error in smartform

Former Member
0 Likes
3,173

Hi All..

I am working on a smartform, which is going to be printed from VL02N Screen.

(VL02N >outbound delivery->Issue output)

Now the form is not getting printed from above mentioned path.. Even not possible to view the print preview.

When i activate smartform, i can view the print preview and even i can print it..

The only thing is i can't make it possible from VL02N screen...

While debuging, i found out that error is associated with "Formatting Error".

When i looked into SSF_ERROR_READER, the error in the message class is "No other column available (see the long text)"..

Where to make necessary changes or where to work out for removing this error..??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,304

Hi,

Have you assigned form and program to output type?

If not then assign, NACE transaction is for that.

Then for those output types that form only will be called.

7 REPLIES 7
Read only

Former Member
0 Likes
2,305

Hi,

Have you assigned form and program to output type?

If not then assign, NACE transaction is for that.

Then for those output types that form only will be called.

Read only

0 Likes
2,304

Thanks Palak...

When i enter Delivery No in VL02N screen and then clicking outbound delivery-->Issue Delivery output, the system will pop up a window, where i can select my smartform.

Hence form and program has been assigned to output type... Am i right..??

Once i select the Printer name and select either PRINT or Print Preview, then i started debugging...

Later i found an error in the Function Module" /1BCDWB/SF00000113" called 'Formatting Error"...

My Table in the form is having same width as the Main Window..

sum of all columns in the table is equal to width of the column...

I am totally worried...where is the fault, which is causing this "Formatting Error"..??

Please Help me out.....

Regards

Pavan

Read only

0 Likes
2,304

Pavan,

The Smart form will not be called directly.

First SSF_FUNCTION_MODULE_NAME is called and the form name is passed to this, which will return the function module which is generated by the system for that smart form.

Now, that function is dynamically called some thing like

CALL FUNCTION fmname, where fmname is the output of SSF_FUNCTION_MODULE_NAME.

So, you will not be able to see a call to /1BCDWB/SF00000113 directly. Look into the driver program.

Regards,

Ravi

Read only

0 Likes
2,304

Thanks Ravi..

I have passed the form name in SSF_FUNCTION_MODULE_NAME .

Then there is one more FM as "CALL FUNCTION fmname" where fmname is the output of SSF_FUNCTION_MODULE_NAME....

Regards

Pavan

Read only

0 Likes
2,304

Didn't get your question?

Why don't you paste the code where the call is being made and let me know what exactly are you looking for?

Regards,

Ravi

Read only

0 Likes
2,304

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

FORMNAME = tnapr-SFORM

IMPORTING

FM_NAME = fm_name

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3.

CALL FUNCTION fm_name

EXPORTING

SELLER_COUNTRY = seller_country

SELLER_REGION = seller_region

SHIPTO_COUNTRY = shipto_country

SHIPTO_REGION = shipto_region

FORWARDER_COUNTRY = forwarder_country

FORWARDER_REGION = forwarder_region

NOTIFY_COUNTRY = notify_country

NOTIFY_REGION = notify_region

TOTAL_LINES = total_lines

TOTAL_QTY = total_qty

TOTAL_NET_WT = total_net_wt

TOTAL_GROSS_WT = total_gross_wt

TOTAL_VOL = total_vol

DATE = SY-DATUM

TIME = SY-UZEIT

NOTIFY_ADDR = GV_NOTIFY_ADDR

FORWARDER_ADDR = GV_FORWARDER_ADDR

SHIPTO_ADDR = GV_SHIPTO_ADDR

SELLER_ADDR = GV_SELLER_ADDR

SHIPTO_NUM = GV_SHIPTO_NUM

NOTIFY_NUM = GV_NOTIFY_NUM

FORWARD_NUM = GV_FORWARD_NUM

ZONE = GV_ZONE

TABLES

I_FREIGHT_MODE = i_freight_mode

I_PORT_EXIT = i_port_exit

I_PORT_ENTRY = i_port_entry

I_ORIGIN_GOODS = i_origin_goods

I_PACK_NOTES = i_pack_notes

I_PACK_INSTRUCT = i_pack_instruct

I_SHIP_INSTRUCT = i_ship_instruct

I_PORT_MARKS = i_port_marks

I_SELLER_ADD = i_seller_add

I_SOLDTO_ADD = i_soldto_add

I_SHIPTO_ADD = i_shipto_add

I_FORWARDER_ADD = i_forwarder_add

I_NOTIFY_ADD = i_notify_add

I_DELIVERY = i_delivery

I_DELIVERY_INFO = i_delivery_info

I_SALES_INFO = i_sales_info

I_DIMENSION = i_dimension

I_SERIAL_NO = i_serial_no

EXCEPTIONS

<b>FORMATTING_ERROR = 1</b>

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

IF SY-SUBRC NE 0.

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

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

ENDIF.

Ravi,

While debuggin the code, i came acrsoo sy-subrc = 1, which is nothing but 'Formatting Error".. ( I have made it as BOLD in the above code..

Due to this, i am unable to print the smartform from VL02N screen.

But if i activate the form in smartform screens, i can get the print previews and even print..

In VL02N screen, i will enter a outbound delivery No and from Menu bar i will click outbound delivery -


> Issue outbound Delivery.

Then i will get a pop up of Message types, where i will select my message type (smartform) and click for Print.. Later it will display the printing window with Printer Name, etc...

If i opt for PRINT PREVIEW, the window will disappear... A success message will appear as "Output was successfully issued"..

Same thing happens for even PRINT option..

Printer is correctly configured....

Now the Qn is How to get the Print and Print Preview from VL02n screens..??

WHere to corrct the code for the 'FORMATTING ERROR"..???

Thanks and Regards

Pavan

Read only

Former Member
0 Likes
2,304

Pavan,

Looks like you are using a TABLE / TEMPLATE object where in you are referring a COLUMN that does not exist. That is the error.

As far as the print preview issue is concerned, in the driver program where the smart form is being called, you need to set the TDNOPREV (SSFCOMPOP) to SPACE and set PREVIEW, NO_DIALOG of SSFCTRLOP to 'X'. Then the system will throw the preview dialog box.

Regards,

Ravi

Note - Please mark all the helpful answers