cancel
Showing results for 
Search instead for 
Did you mean: 

How to test smartforms with test data in development client?

Former Member
0 Kudos

My organization is using SMARTFORMS for our Delivery Orders. It was developed by our previous SAP Consultant during implementation stage.

Now we have some new requirement and would like it to be added to the Delivery Orders output.

I've created a copy of the SMARTFORMSand named it V2. But how do i test it with some test data in development client?

VL0xN is still tied to the original version of the SMARTFORMS.

Accepted Solutions (1)

Accepted Solutions (1)

former_member209818
Active Contributor
0 Kudos

Have you assigned the new Copied form to Output type for your Deliveries?

It can be done in NACE transaction.

If you want to do the testing without assigning the new Smartform to Output type, then put a breakpoint in the Driver program of the original smartform, and moment program stops inside the Driver program routine, assign new Form name in the runtime. Your have to replace the Form name in tnapr-fname variable.

Former Member
0 Kudos

Dear Harshad,

I'm trying to avoid changing that as it would trigger a TR.

I just wan to test the V2 see whether it works. Then only i do the actual changes on the original SMARTFORM.

former_member209818
Active Contributor
0 Kudos

see my earlier reply. Its updated. Your old formname will be there in tnapr structure or try to replace the form name in the driver program, while calling the FM to fetch the Smartform Function module name.

Former Member
0 Kudos

If you want to do the testing without assigning the new Smartform to Output type, then put a breakpoint in the Driver program of the original smartform, and moment program stops inside the Driver program routine, assign new Form name in the runtime. Your have to replace the Form name in tnapr-fname variable.

What is this Driver program?

I should go to VL02N, (System > Utilities > Debug ABAP), then Issue Delivery Output?

former_member189779
Active Contributor
0 Kudos

I hope you are using RLE_DELNOTE program to print. Put breakpoint

at line 71 call function 'SSF_FUNCTION_MODULE_NAME'. In debugiing change the form name.

Make update debgugging ON.

former_member209818
Active Contributor
0 Kudos

NO. Do you know using which output type your deliveries are getting printed?

Go to VL03n. On the first screen, select "Issue output" from First menu. there you will get, which output type is getting used for printing the delivery. After that got to TNAPR table and find the Driver program name, its form Routine and Smartform name assigned for that Output type.

Former Member
0 Kudos

Dear Vinit,

According to my TNAPR table, my environment is using RLE_DELNOTE.

Here's what i tried

1. Go to TCode: VL02N

2. Switch on Debugging ABAP

3. Issue Delivery Output.

But i couldnt find the line 71 that you mention.

Kindly advise

Former Member
0 Kudos

Dear Harshad,

Yup, i do know which output type it is going to.

However how do i execute what Vinit has suggested?

former_member189779
Active Contributor
0 Kudos

First put a breakpoint in program RLE_DELNOTE line 71 and where the FM is called. Then issue the output. It should stop at your breakpoint. Change the Form name to your Form before execution of this FM in debgugging.

I can also see the line

    lf_formname = tnapr-sform.

Here you change the Form name to your Form.

former_member209818
Active Contributor
0 Kudos

What is the entry in TNAPR table for your Output type? can you  please tell th details of Program/Routine and Form name.

Vinit has given details of Std driver program. but not sure if your project is using std Program or not.

But in your project's Driver program (Program in the TNAPR entry), you can find the occurance of FM call "SSF_FUNCTION_MODULE_NAME" and change the value of SF name which is getting passed to this FM.

Former Member
0 Kudos

Harshad,

Thank you for being so patience with me

former_member209818
Active Contributor
0 Kudos

In the RLE_DELNOTE program, your will find the subroutine ENTRY.

On the very first statement of this routine put a breakpoint.

Now instead of VL02N, go to VL71 and put your output type ZD00, and delivery Number and try executing the program. you should get the your delivery as output. Check the check-box and either try executing further or Press "Print preview button." It iwll stop at your breakpoint. now make the changes to your smartform name as mentioned earlier and your form will get called

former_member189779
Active Contributor
0 Kudos

Hi Chin

As told Goto SE38 Put Program Name  RLE_DELNOTE Display.

Find Line    lf_formname = tnapr-sform.

Put External Break Point.

Goto Vl02n Issue Output.

Program will stop here. Change the value of variable lf_formname to your Smartform Name and exceute.

This should work.

former_member209818
Active Contributor
0 Kudos

Hi Chin,

if you are testing using VL02n, then while assigning output type make sure that your are mentioning "Send Immediately" in the Further data option of O/P type settings. Then only your driver program will get trigger immediately and it will stop at the breakpoint.

Former Member
0 Kudos

Dear Vinit and Harshad,

After reading your valuable feedbacks, i've managed to test the data. Here are my steps

1. Go to SE38. Display RLE_DELNOTE.
2. Set "Session Breakpoint" at Line 45.

    * SmartForm from customizing table TNAPR

      LF_FORMNAME = TNAPR-SFORM

3. Save

4. Go to VL02N

5. Issue Delivery Output

6. Select the "Message Type"

7. Debugger started.

8. Double click on "TNAPR-SFORM"

9. The form name will be shown on right.

10. Click the pencil to change.

11. Insert the new form name.

12. Continue the debugger.

13. Voila.

Thank you very much. I really learn things here

Answers (0)