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

Smartform Text

Former Member
0 Likes
680

Hi Abapers,

i m working in smartforms i hav be stopped at a place where i m unable to proceed. My requirement is i hav created a custom table ZSD_INSP_REQ

which contains a field ·Text to print (ZSD_INSP_REQ-TEXT) CHAR25.

so when i m giving the text in smartforms that is throwing error that text is not defined.

Frnds can anyone guide me what shuld be done to get the text printed in the smartform.

thanking u all.

regards,

sanjay

6 REPLIES 6
Read only

Former Member
0 Likes
658

Hi sanjay,

check if your form interface has a tables parameter defind for that z table.

Also, you should declare a work area of that type.

then you can use a loop element to loop at the table into the work area and use that work area field in the text elements under the loop element.

Regards,

Ravi

Read only

0 Likes
658

Hi Ravi,

There is no need of loop yaar but see...

need fo loopyaar thr is one condition to be checked so based on tht condition

it should be displayed tht text is stored as " Inspection required".

so based on the conidition it should be displayed whethr for tht particular PO

text should be printed or not

u got it?

____________________________________________________________________

The printout takes place when a material document for GR of purchase orders or outbound deliveries is printed.

Output type ZTAG uses print program ZMMRMATTAG, form routine ENTRY, Smartform ZZ_MMMATERIAL_TAG.

1. Create Z-Table do make the print out plant and movement specific: Table ZSD_INSP_REQ with the following Fields

· Plant (ZSD_INSP_REQ-PLANT) CHAR4

· Movement type (ZSD_INSP_REQ-BWART) CHAR3

· Stock Type (ZSD_INSP_REQ-INSMK) CHAR1

· Language (ZSD_INSP_REQ-SPRAS) LANG1 (ABAP internal length 2)

· Text to print (ZSD_INSP_REQ-TEXT) CHAR25

2. Create FM Z_CHECK_INSPEC_REQ (Suggestion: create function module)

Input parameter:

· Plant (from MSEG-WERKS)

· Movement type (from MSEG-BWART)

· Stock type (from MSEG-INSMK)

· Language (Logon language SYST-LANGU)

Output parameter:

· Text to print (ZSD_INSP_REQ-TEXT) -

3. Program logic:

When posting a goods receipt a material document is created (table MSEG) which is used to determine whether or not the text in ZSD_INSP_REQ-TEXT (Inspection required) is printed.

If

Plant in MSEG-WERKS = Plant in table ZSD_INSP_REQ-PLANT) and

Movement type in MSEG-BWART = Movement type in ZSD_INSP_REQ-PLANT-BWART and

Stock Type in MSEG-INSMK = Stock Type in ZSD_INSP_REQ-INSMK and

Language (Logon language SYST-LANGU) = Language in ZSD_INSP_REQ-SPRAS

then

print content maintained in table field ZSD_INSP_REQ-TEXT

else (if no entry in table or no match) do no print content of ZSD_INSP_REQ-TEXT

thnking u all.

regards,

sanjay..

Message was edited by:

sanjay jaju

Read only

0 Likes
658

Hi frnds,

Any help plz...

regards,

sanjay

Read only

0 Likes
658

Frnds,

Its an issue with high priority plzz help me..

thnking u.

regard,

sanjay

Read only

0 Likes
658

Frnds any suggestion from ur side regarding this issue.

regards,

sanjay

Read only

0 Likes
658

hi

after cing ur post i can suggest you these things,

1.check whether the function module is returning the text after u r calling that in the form,and also c that wehther the field TEXT is specified in the output parameters of the program lines.

put a manual break-point in the prog lines and Debug.

Regards

Zarina