cancel
Showing results for 
Search instead for 
Did you mean: 

Printing Description in delivery note

Former Member
0 Kudos

Hi all,

In delivery note printing I am printing material description from lips-arktx.Here, for delivery type Z501 and order type Z800

I need to print description from other two tables.T370K_T and EQUI .my problem is here for printing Description I need to use three variable fields .i.e.GROES and HERST from EQUI and EARTX from T370K_T.Here I am not clear in smartform and program logic as i have not worked that much on smartforms.

Thanks in advance.

Regards,

Harshada

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Harshada,

I am not able to get your requirement. Can you please explain what exactly you want to do?

Thanks,

Archana

Former Member
0 Kudos

Hi Archana,

Thanks for quick response.Here I want to print Description for delivery note.In my case I am already printing description from lips-arktx.all data is coming from standard LEDLV_DELNOTE structure and IT_GEN component.but if delivery type equals z501 and order type equals z800.I need to print description from following logic.

pass sdaufnr in ser02 table and get obknr check for ser02-vorgang = sdau.pass this obknr in objk table and get equnr.pass this equnr in equi table and fetch groes ,herst and eqart.pass this in t370k_t table and fetch eartx.

how I can apply this logic in my smartform.

Regards,

Harshada

Former Member
0 Kudos

Hi Harshada,

For this, you need to create program lines in your smartform before the text elemnt in which your priting this description.

Now, you know how to fetch this description, tables and all. You just need to create program lines and put this fetching logic in smartform.

Take that description in string variable and then pass it to text element which prints this description.

Let me know if you need more help on this.

Thanks,

Archana

Former Member
0 Kudos

Hi,

Thanks for quick reply.Do I need to make changes in print program.see this data is coming from standard structure.

i have made similar ZLEDLV_DELNOTE structure in se11.how i can excute this logic in program and smartform.

Regards,

Harshada

Former Member
0 Kudos

Hi Harshada,

You need to pass your internal tables populated in print program to smartforms. Then, the internal table values will be reflected in the smartforms.

For this, you need to define that structure in form interface -> import parameters. If it is a table, then define it in form interface -> tables in smartform.

Then you can use this table/ structure to fetch further data from other tables as you mentioned.

Thanks,

Archana

Thanks,

Archana

Former Member
0 Kudos

Hi Archana,

see I am passing this structure from print program into smartform.these are following details of my source code.

DATA: ls_dlv_delnote1 TYPE zledlv_delnote.

DATA: ls_dlv_delnote TYPE ledlv_delnote.

IF cf_retcode = 0.

  • select print data

PERFORM get_data USING ls_print_data_to_read

CHANGING ls_addr_key

ls_dlv_delnote

cf_retcode.

ENDIF.

FORM GET_DATA

USING IS_PRINT_DATA_TO_READ TYPE LEDLV_PRINT_DATA_TO_READ

CHANGING CS_ADDR_KEY LIKE ADDR_KEY

CS_DLV_DELNOTE TYPE LEDLV_DELNOTE

CF_RETCODE.

DATA: LS_DELIVERY_KEY TYPE LESHP_DELIVERY_KEY.

LS_DELIVERY_KEY-VBELN = NAST-OBJKY.

CALL FUNCTION 'LE_SHP_DLV_OUTP_READ_PRTDATA'

EXPORTING

IS_DELIVERY_KEY = LS_DELIVERY_KEY

IS_PRINT_DATA_TO_READ = IS_PRINT_DATA_TO_READ

IF_PARVW = NAST-PARVW

IF_PARNR = NAST-PARNR

IF_LANGUAGE = NAST-SPRAS

IMPORTING

ES_DLV_DELNOTE = CS_DLV_DELNOTE

EXCEPTIONS

RECORDS_NOT_FOUND = 1

RECORDS_NOT_REQUESTED = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

  • error handling

CF_RETCODE = SY-SUBRC.

PERFORM PROTOCOL_UPDATE.

ENDIF.

  • get nast partner adress for communication strategy

PERFORM GET_ADDR_KEY USING CS_DLV_DELNOTE-HD_ADR

CHANGING CS_ADDR_KEY.

ENDFORM.

here I am passing ls_dlv_delnote1 this variable.but data is not getting populated.

Regards,

Harshada

Former Member
0 Kudos

Hi,

See, once you are fethcing all the details in the print program, you must be calling your smartform right?

While calling your smartform FM, you must be exporting some parameters. In that you need to add your structure and in smartform, in form interface in Importing parameters you need to add this again.

So that it will get reflected there in smartform.

Thanks,

Archana

Former Member
0 Kudos

Hi Archana,

Thanks for ur valuable feedback.my problem is solved.

Regards,

Harshada

Answers (0)