Application Development 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: 

FM "ADDRESS_INTO_PRINTFORM" -want to insert the State name

Former Member
0 Kudos

In a script, m using FM "ADDRESS_INTO_PRINTFORM' exporting

ADDRESS_TYPE 1

ADDRESS_NUMBER (comes fm select stat. - table TWLAD)

But in import table, I am not getting the State Name (field - ADRC-REGIO's desc.), which I have to add in Print o/p.

How can I do this?

Regards,

Ashlesha

1 ACCEPTED SOLUTION

satyajit_mohapatra
Active Contributor
0 Kudos

May be you are calling the FM through a form routine created through PERFORM-ENDPERFORM.

Try with ADDRESS-ENDADDRESS once and see if the issue still persists.

6 REPLIES 6

satyajit_mohapatra
Active Contributor
0 Kudos

May be you are calling the FM through a form routine created through PERFORM-ENDPERFORM.

Try with ADDRESS-ENDADDRESS once and see if the issue still persists.

Former Member
0 Kudos

For all addresses? Is ADRC-REGIO populated?

Former Member
0 Kudos

Thanks for Reply.

Here, I am using FM in Driver Program and not in Subroutine pool (perform stat.)

Thanks for showing this way.

If driver prog -FM - won't work - I'll try this way.

But if it is possible with FM, it'll give me the best match with requirement.

For Address - I am using this for another City Storage Location Address.

(This Script is for -" Stock transfer Invoice/Challan " - For one SLoc to another of Same Org. - Same Plant)

No it's not populated --

O/p table = lt_address with two fields - as

LINE_TYPE - ADDRESS_LINE

1 - add line 1

2 - add line 2

3 - add line 3

S - Street name

O - city name postal-code

L - country

satyajit_mohapatra
Active Contributor
0 Kudos

If the region is not populated, the FM will not fetch it. If the requirement is for a particular region, then it can be hardcoded in the script along with the line items returned from FM.

Former Member
0 Kudos

Thanks Satyajit

But the client has Storage Location at more than 50+ cities, so almost all States will cover.

I can't hardcode.

Please Suggest -

If I take the FM o/p table in work-area.

 LOOP AT LT_ADDRESS INTO LS_ADDRESS.
            Select regio from adrc INTO v_regio  ----with WHERE cond.
  if line_type = '0'.
    the CONCATENATE v_region address_line.
 endif.

Then will This make difference in Script display - Print o/p. font size or line allignment of new added 'State' and other address

satyajit_mohapatra
Active Contributor
0 Kudos

But, if the REGIO field is not populated in ADRC, then how it can be fetched through select query. The only way is to maintain the region in master data or maintain it in custom table based on plant/st loc and fetch it from there.