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

Smart Form Displayng Incorrect Document

Former Member
0 Likes
981

Hello, 

We have an issue with our smart form displaying an incorrect document.  The odd thing is we cannot locate this text anywhere in our documents.  I have worked with our developer to debug the smart form code and found that there are 2 physical records associated with 1 logical record and the smart form is not displaying the the correct physical record.  But I would still think we should be able to search the documents and locate this incorrect record.

Any advice here?  Please let me know if more information is needed.

Thanks,

Roseanne

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
954

Debugging is still what you need to do first.  The code has to make the physical records available.  Therefore, You should be able to se where it is provided and thus where it came from.

Just at a guess, I'm going to bet on old data being mixed with the new.

As an option, Please have you programmer concentrate on making sure that everything is cleared out and reset before the data is moved.  Also verify that PIDs are not transferring unintentional data.

Neal

6 REPLIES 6
Read only

Former Member
0 Likes
955

Debugging is still what you need to do first.  The code has to make the physical records available.  Therefore, You should be able to se where it is provided and thus where it came from.

Just at a guess, I'm going to bet on old data being mixed with the new.

As an option, Please have you programmer concentrate on making sure that everything is cleared out and reset before the data is moved.  Also verify that PIDs are not transferring unintentional data.

Neal

Read only

0 Likes
954


Neal,  Thanks for your response.  It appears the code is selecting the physical records based on the logical record.  When I search in Documents, the correct record displays but when I run the smart form the incorrect record displays.  Not matter what I search on in Documents, I cannot retrieve this incorrect record. I don't see a way to retrieve a document based on physical name.  We will continue to look at the code.

Thanks,

Roseanne

Read only

0 Likes
954

Can you give us a snippet of the code that selects the physical record and the code surrounding it?

Neal

Read only

0 Likes
954

One thing that can cause a symptom like this is a select single (or a select up to) that is not followed by a test of sy-subrc.

Another is a select loop that overwrites the values, because it assumes that it will only retrieve 1 record, but instead it retrieves multiple.  Then the only one displayed is the last one.

Neal

Read only

FredericGirod
Active Contributor
0 Likes
954

Hi Roseanne,

that could be very hard to find the origin of a text.

You could find include of text store in the transaction SO10

You could find text compose with some customizing table ...

Is this a  best practice smartforms ?  a standard smartforms ?

regards

Fred

Read only

Former Member
0 Likes
954

Hello Roseanne,

As i get you right, the form doesn't display one value (you wrote document, but is dont know excatly what you mean) in the right (or at least expected) way and you can't find the value in the smartform.

So my next question is, what your meaning of physical and locical records? I can only imagin the there are 2 recordes in the database and only one is printed in the form. If im wrong please correct me.

First of all you should be able to find the spot where the data is writen to the form. Trie to narow down area where it will be printed by commanting out block by block ( conditions tab 1 = 2).

If you find the right node do the same thing on the subnode until you get the node where the error appers.

Everything that is printed in the form have to be anywhere in a node/table/loop and so on.

You can also tie to set a breakpoint in the globae area, at the beginning and serch the structres for the entry which is wrong. Maybe this will help you to find the right spot.

Good luck with fixing the form!

Br,

Nikolaus