Skip to Content
author's profile photo Former Member
Former Member

pnp report

Input is state( infotype 0006).Output PERNR,NAME,STATE CODE,TATE NAME,

COUNTRY CODE,COUNTRY NAME ,and sort by state.

can any one help me out.

Thanks & Regards

KAVITHA

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2007 at 03:39 AM

    Hi,

    What do you want from us.

    Regards,

    Atish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2007 at 03:46 AM

    Hi

    write a select query based on the state in where condition

    SELECT PERNR,NAME,STATE CODE,TATE NAME,

    COUNTRY CODE,COUNTRY NAME from table

    into table iatb

    where state = P_state.

    any thing elase you want from this

    Reward if usefull

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2007 at 06:05 AM

    Hi Kutti,

    Please correct your program accordingly.

    I have corrected your program. You can those changes in bold.

    REPORT Z_JSU_BSP .

    tables : pernr,t005u,t005t.

    infotypes : 0006,

    0001.

    *data: t001 like standard table of t001 with header line.

    data : w_bezei like t005u-bezei,

    w_landx like t005t-landx.

    • Data : begin of itab occurs 0,

    • pernr like p0006-pernr,

    • ename like p0001-ename,

    • state like p0006-state,

    • land1 like p0006-land1,

    • bukrs like p0001-bukrs,

    • bezei like t005u-bezei,

    • landx like t005t-landx,

    • butxt like t001-butxt,

    • end of itab.

    select-options : state for p0006-state,

    s_pernr for p0006-pernr.

    get pernr.

    *provide.

    rp_provide_from_last p0006 space pn-begda pn-endda.

    if pnp-sw-found = 1.

    *if pnp-sw-found eq 1.

    *

    • if state = ' '.

    • move-corresponding p0006 to itab.

    *

    rp_provide_from_last p0001 space pn-begda pn-endda.

    *if p0001-bukrs = t001-bukrs .

    <b>select single bezei from t005u into w_bezei where spras = sy-langu and

    land1 = p0006-land1 and

    bland = p0006-state.

    select single landx from t005t into w_landx where spras = sy-langu and

    land1 = p0006-land1.</b>*write : / w_butxt.

    *endif.

    if pnp-sw-found = 1.

    *write : / sy-vline,

    • 2 pernr-pernr,

    • 17 sy-vline,

    • 18 p0001-ename,

    • 36 sy-vline,

    • 37 p0006-state,

    • 40 sy-vline,

    • 41 p0006-land1,

    • 44 sy-vline,

    • 45 w_bezei,

    • 60 sy-vline,

    • 61 w_landx.

    <b>write : / sy-vline,

    2 p0006-pernr,

    17 sy-vline,

    18 p0001-ename,

    36 sy-vline,

    37 p0006-state,

    40 sy-vline,

    41 w_bezei,

    62 sy-vline,

    63 p0006-land1,

    71 sy-vline,

    72 w_landx,

    86 sy-vline.

    else.

    message e999(zjsu1).

    endif.

    endif.</b>

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.